- Home /
If destroyed? how to check if destroyed?
i have 12 separate gameobjects that the player must destroy in order to advance to the next level. how would i go about checking if all 12 of these objects are disabled/destroyed? I can get it to play the animations and sounds properly but how would i set an if statement to see if they are destroyed?
Answer by MiraiTunga · Feb 14, 2013 at 12:05 AM
You could try to create a script with an array of the game objects and everytime one is destroyed (if GambObject==Null) increment a variable in the script when the variable becomes a certain number do something etc
Your answer
![](https://koobas.hobune.stream/wayback/20220613092642im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Checking Instantiate/Destroy has been called | Checking number of scene GameObjects 1 Answer
Cannot destroy GameObject while it is being activated or deactivated. 1 Answer
Check GameObject postion 1 Answer
OnDisable() getting called from Destroy() 6 Answers
using Contains(gameObject) to find and destroy a gameObject from a list 2 Answers