Answers for "how to get refernce to a child unity"

C#
7

unity access child

// To acces a child of a gameObject use the combination below
parentGameObject.transform.GetChild(0).gameObject
Posted by: Guest on February-20-2020
4

how to reference a child object unity

private void Start()
    {
        parentObject = GameObject.Find("Parent");// The name of the parent object
        childObject = parentObject.transform.GetChild(0).gameObject; // the parent index (starting from 0)
    }
Posted by: Guest on July-03-2020

Code answers related to "how to get refernce to a child unity"

C# Answers by Framework

Browse Popular Code Answers by Language