how to access to object child unity code example
Example 1: unity access child
// To acces a child of a gameObject use the combination below
parentGameObject.transform.GetChild(0).gameObject
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)
}