Complete the code to create a new GameObject in the scene hierarchy.
GameObject newObject = new GameObject([1]);The GameObject constructor takes a string name as parameter to set the object's name in the hierarchy.
Complete the code to set the parent of a GameObject in the scene hierarchy.
childObject.transform.[1] = parentObject.transform;The transform.parent property sets the parent transform of a GameObject in the hierarchy.
Fix the error in the code to correctly find a GameObject by name in the scene hierarchy.
GameObject found = GameObject.[1]("Player");
FindObjectOfType which searches by component type.GameObject.Find(string name) searches the scene hierarchy for a GameObject with the given name.
Fill both blanks to create a child GameObject and set its parent in the hierarchy.
GameObject child = new GameObject([1]); child.transform.[2] = parent.transform;
SetParent() method incorrectly.Create the child with a name string, then assign its transform.parent to the parent's transform.
Fill all three blanks to create a GameObject, set its parent, and rename it in the hierarchy.
GameObject obj = new GameObject([1]); obj.transform.[2] = parent.transform; obj.name = [3];
SetParent() method with the parent property.Create the object with a name, set its parent transform, then rename it by assigning to obj.name.