0
0
Unityframework~10 mins

Why 3D expands game possibilities in Unity - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a 3D cube in Unity.

Unity
GameObject cube = GameObject.CreatePrimitive([1]);
Drag options to blanks, or click blank then click option'
ACubeType
BPrimitiveType.Cube
C3DObject.Cube
DGameObject.Cube
Attempts:
3 left
💡 Hint
Common Mistakes
Using a non-existent type like CubeType or GameObject.Cube.
Confusing 3D object creation with 2D sprites.
2fill in blank
medium

Complete the code to move the 3D object forward in Unity.

Unity
transform.Translate(Vector3.[1] * speed * Time.deltaTime);
Drag options to blanks, or click blank then click option'
Aup
Bleft
Cright
Dforward
Attempts:
3 left
💡 Hint
Common Mistakes
Using Vector3.up moves the object vertically, not forward.
Using Vector3.right moves sideways.
3fill in blank
hard

Fix the error in the code to rotate the 3D object around the y-axis.

Unity
transform.Rotate(0, [1], 0);
Drag options to blanks, or click blank then click option'
A100 * Time.deltaTime
BTime.deltaTime * 100
CTime.deltaTime + 100
D100 + Time.deltaTime
Attempts:
3 left
💡 Hint
Common Mistakes
Adding deltaTime instead of multiplying causes incorrect rotation speed.
Using the wrong order can confuse but does not cause error.
4fill in blank
hard

Fill both blanks to create a dictionary mapping 3D object names to their positions if x position is greater than 0.

Unity
var positions = objects.Where(obj => obj.transform.position.x [2] 0).ToDictionary(obj => [1], obj => obj.transform.position);
Drag options to blanks, or click blank then click option'
Aobj.name
B>
C<
Dobj.position
Attempts:
3 left
💡 Hint
Common Mistakes
Using obj.position instead of obj.transform.position.
Using less than symbol instead of greater than.
5fill in blank
hard

Fill all three blanks to create a dictionary of object names in uppercase mapped to their y positions if y is less than 5.

Unity
var lowObjects = objects.Where(obj => obj.transform.position.y [3] 5).ToDictionary(obj => [1], obj => [2]);
Drag options to blanks, or click blank then click option'
Aobj.name.ToUpper()
Bobj.transform.position.y
C<
Dobj.position.y
Attempts:
3 left
💡 Hint
Common Mistakes
Using obj.position.y instead of obj.transform.position.y.
Using greater than symbol instead of less than.