Is there a way to Find() a deactivated object?
You could keep a list of deactivated objects.
Funny, I was thinking about exactly this right now ![]()
hm, so just assign the object prehand.
right, thanks.
I’ve just fixed this problem for a piece of code in Hyperview. Instead of doing this:
object[] OBJs = GameObject.FindSceneObjectsOfType(typeof(GameObject));
foreach(object O in OBJs) {if (((GameObject)O).transform.IsChildOf(PRT.transform)) {MultiSelect((GameObject)O);}}
Now I am doing this:
foreach(Transform T in (PRT.GetComponentsInChildren(typeof(Transform),true))) {MultiSelect(T.gameObject);}
Where ‘PRT’ is the selected gameObject in scene. The ‘true’ on GetComponentsInChildren will make it look for deactivated gameObjects too.
However there is no easy way to find ‘root’ deactivated objects.