This code is called when click on "A button".
When i click on this button::
on editor: run smoothly (no any issues).
on build: it causes a not responding at every first click on the button, and sometimes it stops the game.
when im trying to check what causes that, i found that code...
*notice: this code does not give any errors and works perfectly like i want.*
*notice: this code in a function.*
GameData data = SaveSystem.Load();
int l = 0;
int mapId = 1;
for(int i = 0; i < maps_contents.Length; i++) {
Debug.Log("I:" + i);
for(int k = 0; k < maps_contents[i].transform.childCount; k++) {
Debug.Log("K:" + k);
GameObject child = maps_contents[i].transform.GetChild(k).gameObject;
child.GetComponent
↧