- Home /
enable/disable child objects?
How do i enable/disable an object and its child objects?
Are you using Unity 3 or Unity 4?
for Unity 3 :
gameObject.SetActiveRecursively( true );
For Unity 4 : http://answers.unity3d.com/questions/353475/setactiverecursively-is-now-obsolete-in-unity-40.html
Answer by rutter · May 02, 2012 at 10:18 PM
You can call `SetActiveRecursively(false)` on a GameObject to disable the object, its components, and any children.
And what if you want to deactivate the child WITHOUT deactivating the parent? What then?
Answer by tienphan · Jan 06, 2013 at 07:39 AM
Create an uncle between parent and children, kill the uncle and save the parent :)
Your answer
Follow this Question
Related Questions
Getting an objects Children 1 Answer
enable/disable private gameObject 1 Answer
Disable an child object 1 Answer
Enable/Disable GameObject Button script 1 Answer
enable disable objects when objects collides with other object 1 Answer