how do i get child of gameobject unity code example
Example 1: find child of gameobject unity
gameObject.transform.Find("ChildGameObject").gameObject;
//This insures that you are finding the child instead of finding another
//GameObject's Child.
Example 2: 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)
}