Complete the code to create a 3D cube in Unity.
GameObject cube = GameObject.CreatePrimitive([1]);In Unity, to create a 3D cube, you use PrimitiveType.Cube with CreatePrimitive.
Complete the code to move the 3D object forward in Unity.
transform.Translate(Vector3.[1] * speed * Time.deltaTime);To move an object forward in 3D space, use Vector3.forward.
Fix the error in the code to rotate the 3D object around the y-axis.
transform.Rotate(0, [1], 0);
Multiplying rotation speed by Time.deltaTime ensures smooth rotation over time.
Fill both blanks to create a dictionary mapping 3D object names to their positions if x position is greater than 0.
var positions = objects.Where(obj => obj.transform.position.x [2] 0).ToDictionary(obj => [1], obj => obj.transform.position);
Use obj.name as the key and check if x position is greater than 0 with >.
Fill all three blanks to create a dictionary of object names in uppercase mapped to their y positions if y is less than 5.
var lowObjects = objects.Where(obj => obj.transform.position.y [3] 5).ToDictionary(obj => [1], obj => [2]);
Use obj.name.ToUpper() for uppercase names, obj.transform.position.y for y position, and < to check if y is less than 5.