Answers for "how to loop through children in unity"

C#
4

unity cycle children

for(int i = 0; i < gameobject.transform.GetChildCount(); i++)
{
   Transform Children = gameobject.transform.GetChild(i);
}
Posted by: Guest on March-23-2020
3

unity foreach child

foreach(Transform child in transform)
{
	print(child.gameObject.name)
}
Posted by: Guest on April-22-2021

Code answers related to "how to loop through children in unity"

C# Answers by Framework

Browse Popular Code Answers by Language