---
title: "Unit 2 - Program a basic game"
content_type: quiz
url: "https://learn.unity.com/pathway/game-development/unit/create-a-basic-3d-game/quiz/unit-2-program-a-basic-game?language=en"
language: en
container_type: pathway
container_title: "Game Development"
container_url: "https://learn.unity.com/pathway/game-development.md?language=en&version=6.3"
unit_title: "Create a basic 3D game"
unit_url: "https://learn.unity.com/pathway/game-development/unit/create-a-basic-3d-game?language=en&version=6.3"
standalone_markdown_url: "https://learn.unity.com/quiz/unit-2-program-a-basic-game.md?language=en&version=6.3"
previous_title: "Building the Game"
previous_url: "https://learn.unity.com/pathway/game-development/unit/create-a-basic-3d-game/tutorial/building-the-game?language=en&version=6.3"
previous_markdown_url: "https://learn.unity.com/pathway/game-development/unit/create-a-basic-3d-game/tutorial/building-the-game.md?language=en&version=6.3"
next_title: "Introduction to Unit 3"
next_url: "https://learn.unity.com/pathway/game-development/unit/create-a-basic-2d-game/tutorial/introduction-to-game-dev-unit-3?language=en&version=6.3"
next_markdown_url: "https://learn.unity.com/pathway/game-development/unit/create-a-basic-2d-game/tutorial/introduction-to-game-dev-unit-3.md?language=en&version=6.3"
difficulty: beginner
duration_minutes: 15
question_count: 17
correct_answers_to_pass: 14
unity_version:
  - "2022.3"
  - "2022.2"
  - "6.3"
supported_unity_versions:
  - name: "2022.3"
    url: "https://learn.unity.com/quiz/unit-2-program-a-basic-game.md?language=en&version=2022.3"
  - name: "2022.2"
    url: "https://learn.unity.com/quiz/unit-2-program-a-basic-game.md?language=en&version=2022.2"
  - name: "6.3"
    url: "https://learn.unity.com/pathway/game-development/unit/create-a-basic-3d-game/quiz/unit-2-program-a-basic-game.md?language=en&version=6.3"
last_updated: "2026-08-04T14:25:14.000Z"
---

# Unit 2 - Program a basic game

This quiz evaluates the core programming concepts and skills you practiced while building a basic Unity game in Unit 2.

This quiz will assess the knowledge and skills you gained over the course of this Unit 2 on programming a basic game.

## Question 1

Which of the following statements is true about prefabs in Unity?

Select one correct answer.

_Select only one_

- Prefabs are Unity's way of creating custom scripts
- Prefabs are only used for complex 3D models
- Prefabs can only be used once in a scene
- You can create a prefab by dragging a GameObject from the **Hierarchy** window into the **Project** window

## Question 2

Which of the following statements is true about the color palette in your game?

Select one correct answer.

_Select only one_

- The color palette in your game does not affect the mood of your game
- A unifying color appears throughout the game and ties the game's visuals together
- The color palette in your game is irrelevant to the game's art style
- The choice of color palette should be random

## Question 3

What is the purpose of concept art for a game?

Select one correct answer.

_Select only one_

- Concept art serves to visualize and explore ideas before they are put into full production
- Concept art is mainly for marketing purposes
- Concept art has no real purpose in game development
- Concept art is only necessary for 3D games

## Question 4

Which of the following statements are true about video game genres?

Select all correct answers.

_Select all correct answers_

- First-person shooter (FPS) games focus on puzzles and narrative
- Casual games require a high level of skill and commitment and are often targeted at experienced gamers
- In role-playing games (RPGs), players guide the behaviors of characters who are deeply integrated into a distinct universe, typically featuring character progression through the tracking of various stats
- Real-time strategy (RTS) games involve strategic decision-making in real-time scenarios, often including resource management

## Question 5

Which of the following statements are true about game mechanics?

Select one correct answer.

_Select only one_

- Game mechanics are only about scoring systems and health points
- Game mechanics refer to the systems and rules that guide the player's interactions in the game
- Non-player characters (NPCs) are a type of game mechanic
- Game mechanics are irrelevant to the gameplay experience

## Question 6

Which of the following statements are true about AI navigation in Unity?

Select all correct answers.

_Select all correct answers_

- AI navigation in Unity does not include any form of obstacle avoidance
- If there is a moving object in your scene that you want your NavMesh agents to avoid, you should add a **NavMesh Obstacle** component to that moving object
- NavMeshes are used to define the walkable areas for AI characters
- Baking a NavMesh creates a map of the walkable areas in your scene

## Question 7

What is the purpose of the **Max Slope** property in the NavMesh settings?

Select one correct answer.

_Select only one_

- The **Max Slope** property specifies the maximum height that an AI can jump
- The **Max Slope** property determines the maximum slope that the player can climb
- The **Max Slope** property decides the maximum slope that can be used for texturing
- The **Max Slope** property determines the maximum steepness that can be considered walkable in a NavMesh

## Question 8

The following code is in a **CameraController** script, which is on a camera GameObject that follows the player around. Given the comments and code in this script, what code would you use to fill in the blank below?

```csharp
// store a public reference to the Player game object, so we can refer to its Transform
public GameObject player;

// Store a Vector3 offset from the player 
private Vector3 offset;

// At the start of the game..
void Start ()
{
	// Create an offset by subtracting the player's position from the camera's position
	offset = transform.position - ______________;
}
```

_Select only one_

- player.position
- player
- player.transform.position
- transform

## Question 9

In which situation would you want to use the Awake method in a Unity project?

Select one correct answer.

_Select only one_

- To check for user input
- To pause and resume game states
- To repeat a certain action every frame in the game
- To transfer data between GameObjects when a scene loads

## Question 10

Which of the following statements is true about methods in C#?

Select all three correct answers.

_Select all correct answers_

- Methods can be called by typing their name, followed by a pair of parentheses with any required parameters inside
- Methods are reusable segments of code that perform a specific function in the program
- The term 'void' before a method means that the method does not return any value
- Curly brackets {} are used to define the start and end of a class, not a method

## Question 11

Which of the following variables are declared correctly?

Select all correct answers.

_Select all correct answers_

- Rigidbody rb = GetComponent\<Transform>();
- Vector3 playerPosition = new Vector3(0.0f, 0.0f, 0.0f);
- int playerScore = 0;
- float distance = 3.5f;

## Question 12

In which one of the following situations would it make sense to use the FixedUpdate method?

Select one correct answer.

_Select only one_

- To launch a fireworks display every New Year's Eve in-game time
- To update physics-related calculations in your game
- To count the number of in-game days that have passed
- To make a character blink every 10 minutes

## Question 13

What is the name of the script (class) below?

Select one correct answer.

```csharp
using UnityEngine;

public class EnemyWaveHandler : MonoBehaviour
{
    public GameObject enemyPrefab;

    void Start()
    {
        SpawnEnemyWave();
    }

    void SpawnEnemyWave()
    {
        Instantiate(enemyPrefab);
    }
}
```

_Select only one_

- MonoBehaviour
- EnemyWaveHandler
- SpawnEnemyWave
- EnemyWave

## Question 14

Which of the following is an accurate definition of the Time.DeltaTime property?

Select one correct answer.

_Select only one_

- It represents the game's frame rate
- It measures the total amount of time that has passed since the game started
- It is the time in seconds it took to complete the last frame
- It provides the time at the current frame

## Question 15

Which of the following variables will appear in the **Inspector** window?

Select one correct answer.

_Select only one_

-  protected float playerSpeed;
-  public int enemyHealth;
-  Vector3 direction;
-  Rigidbody rb;

## Question 16

Which of the following are valid ways to create a new script in Unity?

Select two correct answers.

_Select all correct answers_

- Right-click in the **Project** window > **Create** > **C# Script**
- From the main menu, **File** > **New** > **Script**
- **Edit** > **Create** > **New C# Script**
- **Add Component** button in the **Inspector** window > **New Script**

## Question 17

In which of the following situations would you want to use a Tag on a GameObject in Unity?

Select one correct answer.

_Select only one_

- To organize your **Project** window
- To play a sound effect
- To change the color of a GameObject
- To easily find and access specific GameObjects in your scripts
