Can't get Child's Child
Hi, I am trying to get a child's child with the following code but it is not working. For example please see the image.
Strangely, if i Debug.Log the Child's Child's gameobject's name it works correctly (Debug.Log(thisBackgroundMesh.name);)
Thank you for your time
thisBackground = transform.GetChild(0).gameObject;
thisBackgroundMesh = thisBackground.transform.GetChild(0).gameObject;
Debug.Log(thisBackgroundMesh.name);
Comment