Answer the question
In order to leave comments, you need to log in
How to find the child of a child element?
There are a certain number of elements that are created as children of the previous one. How can I use a script to find the last child element that exists in a hierarchy?
if (curParent == null)
{
childOfCube = rootObjInScene.transform.Find("forPlayer(Clone)");
if (childOfCube != null)
{
curParent = childOfCube;
}
else curParent = rootObjInScene;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question