Hey there, Im currently writing a script that checks if multiple gameobjects are not active. If any are active I want it to keep checking if there are all inactive I want to do something else.
So far I have: (I know this checks if they are active not inactive which is wrong)
while (cleanBool == false)
{
//Needs to be inactive not active CHANGE!!!
if(check01.activeInHierarchy && check02.activeInHierarchy && check03.activeInHierarchy && check04.activeInHierarchy && check05.activeInHierarchy)
{
cleanBool = true;
}
else
{
return null;
}
}
Is this a terrible way of doing it? Or is there a better way?