Quantcast
Channel: Questions in topic: "issue"
Viewing all articles
Browse latest Browse all 827

Want to optimize this code. causes a wired issue

$
0
0
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

Viewing all articles
Browse latest Browse all 827

Trending Articles