Unity Review and Assessment 3 — Questions and Answers
Question 1: Which method should physics calculations be placed in?
- Update()
- LateUpdate()
- FixedUpdate() (Correct answer)
- OnGUI()
Correct answer: FixedUpdate()
FixedUpdate runs on a fixed timestep, matching the physics engine.
Question 2: What is the purpose of a Tag in Unity?
- To render text
- To identify and categorize GameObjects (Correct answer)
- To set physics mass
- To control lighting
Correct answer: To identify and categorize GameObjects
Tags let you label GameObjects so scripts can find or compare them easily.
Question 3: Which collision callback fires when two non-trigger colliders begin touching?
- OnTriggerEnter
- OnCollisionEnter (Correct answer)
- OnMouseDown
- OnEnable
Correct answer: OnCollisionEnter
OnCollisionEnter is called when colliders with at least one Rigidbody start colliding.
Question 4: What does serializing a private field with [SerializeField] accomplish?
- Makes it public
- Exposes it in the Inspector while keeping it private (Correct answer)
- Deletes it at runtime
- Converts it to a static variable
Correct answer: Exposes it in the Inspector while keeping it private
[SerializeField] shows a private field in the Inspector without exposing it publicly in code.
Question 5: Which file format does Unity use to store scenes?
- .cs
- .unity (Correct answer)
- .mat
- .prefab
Correct answer: .unity
Scene files use the .unity extension.
Question 6: What is the function of the Canvas component?
- Physics simulation
- Rendering UI elements (Correct answer)
- Storing audio clips
- Baking lighting
Correct answer: Rendering UI elements
Canvas is the root area where all UI elements are rendered.
Question 7: Which Unity feature precomputes static lighting to improve runtime performance?
- Realtime GI
- Lightmap baking (Correct answer)
- Occlusion culling
- Frustum culling
Correct answer: Lightmap baking
Lightmap baking stores lighting in textures so it is not recomputed each frame.
Which method should physics calculations be placed in?