Answers for "unity make gameobject child of another"

C#
3

how to reference a child gameobject unity

Transform[] transforms = this.GetComponentsInChildren<Transform>();
 
 foreach(Transform t in transforms)
 {
     if (t.gameObject.name == "Child")
     {
         Debug.Log ("Found " + t);
     }
 }
Posted by: Guest on July-28-2021

Code answers related to "unity make gameobject child of another"

C# Answers by Framework

Browse Popular Code Answers by Language