- Home /
How to Access Components in Children of GameObject?
Is there a way to access the components attached to the children of a GameObject without using GetComponentsInChildren()
?
Some way to access the children directly, then use GetComponent()
to then access their components?
Thank you!
Answer by StephanK · Aug 09, 2010 at 06:11 PM
Transform.Find(string name) is your friend I suppose. http://unity3d.com/support/documentation/ScriptReference/Transform.Find.html
However, there might be multiple instances of a GameObject in my game, so that method would probably not work.
Your answer
Follow this Question
Related Questions
Child gameObject changes name to the parent name when animated 0 Answers
Grabbing all Children and components of those children 1 Answer
Instantiate a copy without its children 0 Answers
Access specific Text among multiple children 0 Answers
Counter for sprite under script from GameObject prefab 0 Answers