Complete the code to create a new GameObject in Unity.
GameObject myObject = new [1]("MyObject");
In Unity, you create a new object by calling new GameObject().
Complete the code to add a component to a GameObject.
myObject.[1]<Rigidbody>();Use AddComponent<T>() to add a component like Rigidbody to a GameObject.
Fix the error in the code to access the Transform component of a GameObject.
Transform t = myObject.[1];The transform property is a shortcut to access the Transform component of a GameObject.
Fill both blanks to create a GameObject and add a BoxCollider component.
GameObject [1] = new GameObject("Box"); [2].AddComponent<BoxCollider>();
We create a GameObject named boxObject and then add a BoxCollider to it using the same variable.
Fill all three blanks to create a GameObject, add a Light component, and set its color to white.
GameObject [1] = new GameObject("LightSource"); Light [2] = [1].AddComponent<Light>(); [2].color = Color.[3];
We create a GameObject lightObj, add a Light component stored in lightComponent, and set its color to white.