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 :)
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a user guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
Answers and Comments
7 People are following this question.
Enable/Disable children / group of objects
Disabling audio Listener on the child of a newly instantiated gameObject?
Enable/Disable a Static object
Disabling/Enabling components in children of children?
Getting an objects Children