Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

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)
    }
 
PREVIOUS NEXT
Tagged: #reference #child #object #unity
ADD COMMENT
Topic
Name
3+1 =