Quantcast
Channel: Questions in topic: "count"
Viewing all articles
Browse latest Browse all 187

I want get gameobjects except destory obejct in loop.

$
0
0
I want get gameobjects except destroy object. My code is here. (It is just sample.) > void free(){> GameObject[] all;>> while(true){> all = GameObject.FindGameObjectsWithTag("test");> destroy(all[Random.Range(0,5)]);> }>> } First in loop. array all is has object count 10 (It is not mean array size); and I was destroy one object in array. So Second time i was expect count 9. But array has still count 10;

Viewing all articles
Browse latest Browse all 187

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>