Which Unity base class do almost all custom scripts attached to a GameObject inherit from?
`MonoBehaviour` is the base class for scripts that attach to a GameObject in the scene. It wires up the Unity lifecycle callbacks (Awake, Start, Update, etc.) and lets the Inspector show serialized fields.
ScriptableObject is a different base class — for data containers that are NOT attached to a GameObject (e.g. a shared "WeaponData" asset). Component is the abstract base that both MonoBehaviour and built-in components (like Transform, Rigidbody) derive from.
Vocabulary: "This script inherits fromMonoBehaviour so it can be attached to a GameObject."
2 / 23
A designer asks: "Why is the speed field editable in the Inspector even though the variable is private?" Which attribute explains this?
`[SerializeField]` exposes a private field to the Unity Inspector without making it public in code. This is the recommended pattern: keep encapsulation in C# while still letting designers tune values without touching code.
Example: [SerializeField] private float speed = 5f; — "speed" now shows up as an editable field in the Inspector, but other scripts cannot reach it directly (obj.speed would still fail).
Related attributes: [Header("Movement")] adds a bold section label above fields in the Inspector; [Tooltip("...")] shows hover text. Both are purely cosmetic and don't affect serialization.
3 / 23
A teammate says: "Don't edit the base prefab directly — create a prefab variant instead." What does this mean?
A prefab variant is a prefab that is based on another prefab (its source) and only stores the properties that differ (overrides). If the base prefab changes later, the variant automatically inherits those changes unless a specific property was overridden.
This differs from duplicating the file, which creates two fully independent prefabs — a fix to one never reaches the other.
Related vocabulary: • Prefab instance: a copy of a prefab placed in a scene • Nested prefab: a prefab placed inside another prefab (e.g. a "Wheel" prefab nested inside a "Car" prefab) • Unpack prefab: break the connection between an instance and its prefab asset, turning it into a plain GameObject • Apply / Revert: push instance overrides back to the prefab asset, or discard them
4 / 23
Fill in the blank: "This component uses a ______ to gradually fade the UI panel over 0.5 seconds."
A coroutine is a Unity-specific way to run code across multiple frames — perfect for effects like fading, which must happen gradually rather than instantly.
Coroutine vocabulary: • IEnumerator — the return type of a coroutine method • yield return null; — pause until the next frame • yield return new WaitForSeconds(0.5f); — pause for a fixed duration • StartCoroutine(FadePanel()); — begins running the coroutine • StopCoroutine(...) / StopAllCoroutines() — cancels a running coroutine (or all of them)
Example: IEnumerator FadePanel() { float t = 0; while (t < 0.5f) { t += Time.deltaTime; canvasGroup.alpha = 1 - (t / 0.5f); yield return null; } }
5 / 23
Which Unity lifecycle method runs once, before `Start()`, even if the GameObject is disabled?
`Awake()` is called once when the script instance is loaded, before any `Start()` methods run across the scene — even before the GameObject is active. It is the standard place for one-time setup and caching references (e.g. rb = GetComponent<Rigidbody>();).
Full lifecycle order (simplified): 1. Awake() — one-time init, before the object is active 2. OnEnable() — called every time the object becomes active 3. Start() — one-time init, called just before the first frame update 4. FixedUpdate() — runs on a fixed timestep, used for physics 5. Update() — runs once per rendered frame, used for gameplay logic and input 6. LateUpdate() — runs after all `Update()` calls, used for camera-follow logic 7. OnDestroy() — called when the GameObject is destroyed, used for cleanup
6 / 23
Why is it usually correct to say "move the Rigidbody in `FixedUpdate`, not `Update`"?
`FixedUpdate` runs on a fixed timestep (default 0.02s = 50Hz) that is synchronized with Unity's physics engine, so physics-related code (forces, `Rigidbody.MovePosition`, collision-sensitive movement) behaves consistently no matter what the render frame rate is.
`Update`, by contrast, runs once per rendered frame — its interval varies with frame rate, which makes raw physics calculations there inconsistent (jittery at low FPS, over-corrected at high FPS).
Rule of thumb: • `Update()` — input polling, non-physics gameplay logic, animation triggers • `FixedUpdate()` — Rigidbody forces and movement, physics-based collision response • `LateUpdate()` — camera follow (runs after the target has already moved in `Update`)
7 / 23
// PR Description:
"Fixes a bug where the player character would clip through walls when sprinting. Added a new `SprintMode` enum and updated the movement script to handle different speed ranges. This ensures consistent collision detection."
This question assesses understanding of effective PR descriptions. The correct answer highlights a developer's approach to debugging – not just fixing the visible symptom (clipping), but addressing the root cause (velocity and collision) with an appropriate design choice (SprintMode). Options A and C are incorrect because they misrepresent the depth and rationale expected in a technical PR, while option D is completely irrelevant to the scenario.
8 / 23
// Slack message from a senior developer to a junior dev:
"Hey Liam, I took a quick look at your recent PR for the player movement. The collision detection seems solid, but I noticed you're using `transform.Translate` directly within the `Update()` method. While it works in this specific case, it's generally best practice to avoid modifying Transform components directly in `Update()`. This can lead to unpredictable behavior and performance issues, especially when dealing with physics calculations.
Could you refactor the movement code to use `Rigidbody.AddForce()` instead? It's designed for handling motion in Unity's physics engine and will ensure smoother and more accurate movement."
This question focuses on a common best practice in Unity development and the reasons behind it. The key misconception here is that directly manipulating the Transform component in `Update()` is always okay. While it *can* work for simple cases, it bypasses Unity's physics engine and can cause issues with collision detection and overall stability. Using `Rigidbody.AddForce()` integrates seamlessly with the physics system, providing a more robust and predictable solution.
9 / 23
During a code review, your teammate says, 'The use of an `enum` for `SprintMode` is good, but I'm not entirely clear on what 'consistent collision detection' means in this context. Can you elaborate on why the original approach was problematic?' Which of the following best describes the issue?
The core issue lies in the original code's use of transform.Translate within the `Update()` method. This bypasses Unity's physics engine entirely and directly manipulates the GameObject's position based on a fixed time step, which is highly susceptible to frame rate fluctuations. This leads to jittery movement and inconsistent collision detection because the engine isn't properly handling the forces involved; an 'enum' itself has no bearing on this problem. Option A is incorrect as it misattributes the issue to missing physics integration. Option C also presents a misunderstanding, although frame rate variations can exacerbate the problem, the root cause is the direct transformation manipulation.
10 / 23
// PR Description:
"Fixes a bug where the player character would clip through walls when sprinting. Added a new `SprintMode` enum and updated the movement script to handle different speed ranges. This ensures consistent collision detection."
This question assesses understanding of effective PR descriptions. The correct answer highlights a developer's approach to debugging – not just fixing the visible symptom (clipping), but addressing the root cause (velocity and collision) with an appropriate design choice (SprintMode). Options A and C are incorrect because they misrepresent the depth and rationale expected in a technical PR, while option D is completely irrelevant to the scenario.
11 / 23
// Slack message from a senior developer to a junior dev:
"Hey Liam, I took a quick look at your recent PR for the player movement. The collision detection seems solid, but I noticed you're using `transform.Translate` directly within the `Update()` method. While it works in this specific case, it's generally best practice to avoid modifying Transform components directly in `Update()`. This can lead to unpredictable behavior and performance issues, especially when dealing with physics calculations.
Could you refactor the movement code to use `Rigidbody.AddForce()` instead? It's designed for handling motion in Unity's physics engine and will ensure smoother and more accurate movement."
This question focuses on a common best practice in Unity development and the reasons behind it. The key misconception here is that directly manipulating the Transform component in `Update()` is always okay. While it *can* work for simple cases, it bypasses Unity's physics engine and can cause issues with collision detection and overall stability. Using `Rigidbody.AddForce()` integrates seamlessly with the physics system, providing a more robust and predictable solution.
12 / 23
During a code review, your teammate says, 'The use of an `enum` for `SprintMode` is good, but I'm not entirely clear on what 'consistent collision detection' means in this context. Can you elaborate on why the original approach was problematic?' Which of the following best describes the issue?
The core issue lies in the original code's use of transform.Translate within the `Update()` method. This bypasses Unity's physics engine entirely and directly manipulates the GameObject's position based on a fixed time step, which is highly susceptible to frame rate fluctuations. This leads to jittery movement and inconsistent collision detection because the engine isn't properly handling the forces involved; an 'enum' itself has no bearing on this problem. Option A is incorrect as it misattributes the issue to missing physics integration. Option C also presents a misunderstanding, although frame rate variations can exacerbate the problem, the root cause is the direct transformation manipulation.
13 / 23
// PR Description:
"Fixes a bug where the player character would clip through walls when sprinting. Added a new `SprintMode` enum and updated the movement script to handle different speed ranges. This ensures consistent collision detection."
This question assesses understanding of effective PR descriptions. The correct answer highlights a developer's approach to debugging – not just fixing the visible symptom (clipping), but addressing the root cause (velocity and collision) with an appropriate design choice (SprintMode). Options A and C are incorrect because they misrepresent the depth and rationale expected in a technical PR, while option D is completely irrelevant to the scenario.
14 / 23
// Slack message from a senior developer to a junior dev:
"Hey Liam, I took a quick look at your recent PR for the player movement. The collision detection seems solid, but I noticed you're using `transform.Translate` directly within the `Update()` method. While it works in this specific case, it's generally best practice to avoid modifying Transform components directly in `Update()`. This can lead to unpredictable behavior and performance issues, especially when dealing with physics calculations.
Could you refactor the movement code to use `Rigidbody.AddForce()` instead? It's designed for handling motion in Unity's physics engine and will ensure smoother and more accurate movement."
This question focuses on a common best practice in Unity development and the reasons behind it. The key misconception here is that directly manipulating the Transform component in `Update()` is always okay. While it *can* work for simple cases, it bypasses Unity's physics engine and can cause issues with collision detection and overall stability. Using `Rigidbody.AddForce()` integrates seamlessly with the physics system, providing a more robust and predictable solution.
15 / 23
During a code review, your teammate says, 'The use of an `enum` for `SprintMode` is good, but I'm not entirely clear on what 'consistent collision detection' means in this context. Can you elaborate on why the original approach was problematic?' Which of the following best describes the issue?
The core issue lies in the original code's use of transform.Translate within the `Update()` method. This bypasses Unity's physics engine entirely and directly manipulates the GameObject's position based on a fixed time step, which is highly susceptible to frame rate fluctuations. This leads to jittery movement and inconsistent collision detection because the engine isn't properly handling the forces involved; an 'enum' itself has no bearing on this problem. Option A is incorrect as it misattributes the issue to missing physics integration. Option C also presents a misunderstanding, although frame rate variations can exacerbate the problem, the root cause is the direct transformation manipulation.
16 / 23
// PR Description:
"Fixes a bug where the player character would clip through walls when sprinting. Added a new `SprintMode` enum and updated the movement script to handle different speed ranges. This ensures consistent collision detection."
This question assesses understanding of effective PR descriptions. The correct answer highlights a developer's approach to debugging – not just fixing the visible symptom (clipping), but addressing the root cause (velocity and collision) with an appropriate design choice (SprintMode). Options A and C are incorrect because they misrepresent the depth and rationale expected in a technical PR, while option D is completely irrelevant to the scenario.
17 / 23
// Slack message from a senior developer to a junior dev:
"Hey Liam, I took a quick look at your recent PR for the player movement. The collision detection seems solid, but I noticed you're using `transform.Translate` directly within the `Update()` method. While it works in this specific case, it's generally best practice to avoid modifying Transform components directly in `Update()`. This can lead to unpredictable behavior and performance issues, especially when dealing with physics calculations.
Could you refactor the movement code to use `Rigidbody.AddForce()` instead? It's designed for handling motion in Unity's physics engine and will ensure smoother and more accurate movement."
This question focuses on a common best practice in Unity development and the reasons behind it. The key misconception here is that directly manipulating the Transform component in `Update()` is always okay. While it *can* work for simple cases, it bypasses Unity's physics engine and can cause issues with collision detection and overall stability. Using `Rigidbody.AddForce()` integrates seamlessly with the physics system, providing a more robust and predictable solution.
18 / 23
During a code review, your teammate says, 'The use of an `enum` for `SprintMode` is good, but I'm not entirely clear on what 'consistent collision detection' means in this context. Can you elaborate on why the original approach was problematic?' Which of the following best describes the issue?
The core issue lies in the original code's use of transform.Translate within the `Update()` method. This bypasses Unity's physics engine entirely and directly manipulates the GameObject's position based on a fixed time step, which is highly susceptible to frame rate fluctuations. This leads to jittery movement and inconsistent collision detection because the engine isn't properly handling the forces involved; an 'enum' itself has no bearing on this problem. Option A is incorrect as it misattributes the issue to missing physics integration. Option C also presents a misunderstanding, although frame rate variations can exacerbate the problem, the root cause is the direct transformation manipulation.
19 / 23
During a code review of a script handling player input, your colleague comments: 'I'm seeing you're using `Input.GetAxisRaw()` directly to control the movement. While functional, consider leveraging a Unity Input System asset for more robust and configurable input management in the future.' What does this comment primarily suggest?
The core message isn't about absolute inefficiency but about *future-proofing* and adopting best practices. While `Input.GetAxisRaw()` works, the Unity Input System provides better configurability (e.g., remapping keys, handling different input devices) and integration with other features like animation blending. This is a common, constructive suggestion in code reviews – not a critical flaw.
20 / 23
You're in a Slack channel discussing a performance issue with a new enemy AI. Another developer asks: 'I'm getting a lot of spikes in frame rate when the enemy is patrolling. What's the most likely reason?' You respond: "It could be related to the frequency of the Update() calls, especially if the enemy is performing complex calculations within that loop."
Frame rate spikes are *extremely* common when `Update()` is called too frequently. The core issue isn't memory leaks (though they can happen) or draw calls (though those can contribute). Frequent calculations within the `Update` loop directly translate to CPU load and thus frame rate drops. This is a fundamental performance consideration.
21 / 23
"This PR addresses an issue where the player's camera would rotate incorrectly when looking at a slightly angled object. We've implemented a new raycast system that precisely determines the target of the camera rotation based on the angle of view, ensuring smooth and accurate targeting. The implementation utilizes `Vector3.Angle()` to calculate the viewing angle."
While the description mentions 'smooth and accurate,' it's *primarily* about fixing a problem (incorrect rotation). The use of `Vector3.Angle()` is a technical detail related to the solution, not the overall goal. The focus here is on resolving the targeting issue, making performance improvements a secondary consideration.
22 / 23
"Hi team, I spent today refining the collision detection for the player's jump. I've been using `Physics.OverlapSphere()` to detect if the player is colliding with any objects during the air phase of the jump and adjusting their velocity accordingly. I'm still working on smoothing out the landing, though."
The description clearly outlines the use of `Physics.OverlapSphere()` – a specific tool for collision detection – during the air phase. While smoothing the landing is a related concern, the *primary* task discussed here is refining the core collision detection logic.
23 / 23
You're debugging a game where the player character occasionally disappears. After examining the code, you discover that the `transform.position` is being updated directly in the main movement loop without any synchronization with the physics engine. What's likely causing this issue?
Unity's physics engine manages movement based on forces and constraints. Directly setting `transform.position` overrides this system, leading to unpredictable results – the character will essentially 'jump' to the new position without proper collision handling or momentum simulation. This is a very common mistake when working with Unity's physics.
What does the "Unity Scripting Vocabulary — Game Engine Language Exercises" exercise cover?
Practise Unity C# scripting vocabulary in English: MonoBehaviour, ScriptableObject, SerializeField, prefabs, coroutines, and the Unity lifecycle.
Is this exercise free to use?
Yes. Every exercise on CoderSlingo, including this one, is free to use with no account, sign-up, or paywall.
How many questions are in "Unity Scripting Vocabulary — Game Engine Language Exercises"?
This exercise has 23 questions. Each one gives instant feedback with an explanation, so you can see exactly why an answer is right or wrong.
Do I need to create an account to save my progress?
No account is required. The progress bar and score are tracked in your browser for the current session -- the exercise is designed to be a quick, repeatable drill rather than something you resume later.
What happens if I get an answer wrong?
You'll see the correct answer highlighted immediately, along with a short explanation of why it's correct. Wrong answers aren't penalized beyond your score, and you can keep going through every question.
How is this exercise different from reading an article?
Articles explain vocabulary and concepts through prose, while exercises like this one are interactive drills -- multiple-choice questions -- that test and reinforce your recall of specific terms and phrasing.
Can I retry this exercise?
Yes -- use the "Try again" button on the results screen to reset your score and go through all the questions again from the start.
Where can I find more Game Engine Language exercises?
Browse the full Game Engine Language hub for related drills, or check the site-wide exercises index for other IT English topics.
Is this exercise suitable for beginners?
This exercise assumes basic familiarity with IT terminology. If a term feels unfamiliar, check the site Glossary for a plain-English definition before attempting the questions.
How often is new content like this published?
New exercises are added regularly across all categories, alongside new vocabulary sets and articles. Check back on the exercises hub to see what's new.