- Home /
Question by
$$anonymous$$ · Aug 26, 2015 at 06:14 PM ·
childchild objectdisable object
Disable one of child of parent gameobject
I wan to disable one of my child gameobject from parent gameobject. I'm instantiating parent GO say as tile while runtime. It has two child one "L" name and the other "R". so, I want to disable either of it.
Comment
Answer by Barachiel · Aug 26, 2015 at 06:46 PM
Using Transform.Find will search the children of a GameObject by name. From there, just disable it as you would normally, such as with 'gameObject.SetActive (false);'.