I have a list of gameobjects. Some of them might or might not be destroyed allready.
I want to know if one is destroyed or not. Is there a way to tell?
Bye, Lucas
I have a list of gameobjects. Some of them might or might not be destroyed allready.
I want to know if one is destroyed or not. Is there a way to tell?
Bye, Lucas
You can tell if a reference to it is null.
var myGameObjects : GameObject[];//some of which may already be destroyed
function DoSomething () {
for(i=0; i<myGameObjects.Length; i++) {
if(myGameObjects[i])//checks if the object exists or not
Debug.Log(myGameObjects[i].name + " exists."
}
}