placeholder image to represent content

Unity - Create with Code - Unit 3 review

Quiz by Kelly Herbert

Our brand new solo games combine with your quiz, on the same screen

Correct quiz answers unlock more play!

New Quizalize solo game modes
10 questions
Show answers
  • Q1

    You are trying to STOP spawning enemies when the player has died and have created the two scripts below to do that. However, there is an error on the underlined code, “isAlive” in the EnemySpawner script. What is causing that error?

    Question Image

    The “p” should be capitalized in “playerController.isAlive”

    The “bool” in the PlayerController class needs a “public” access modifier

    The if-statement cannot be in the Update method

    “isAlive” must start with a capital “I” (“IsAlive”)

    300s
  • Q2

    Match the following animation methods with its set of parameters

    Question Image

    1A, 2B, 3C

    1A, 2C, 3B

    1B, 2A, 3C

    1C, 2A, 3B

    300s
  • Q3

    Given the animation controller / state machine below, which code will make the character transition from the “Idle” state to the “Walk” state?

    Question Image

    setFloat(“Speed_f”, 0.3f);

    setInt(“Speed_f”, 1);

    setTrigger(“Speed_f”);

    setFloat(“Speed_f”, 0.1f);

    300s
  • Q4

    Which of these is the correct way to get a reference to an AudioSource component on a GameObject?

    Question Image

    Line A

    Line B

    Line C

    Line D

    300s
  • Q5

    When you run a project with the code below, you get the following error: “NullReferenceException: Object reference not set to an instance of an object.” What is most likely the problem?

    Question Image

    The Player object does not have a collider

    The Enemy object does not have a Rigidbody component

    The “Start” method should actually be “Update”

    There is no object named “Player” in the scene

    300s
  • Q6

    Which of the following conditions properly tests that the game is NOT over and the player IS on the ground

    Question Image

    Line A

    Line B

    Line C

    Line D

    30s
  • Q7

    By default, what will be the first state used by this Animation Controller?

    Question Image

    “Any State”

    “NotCrouched”

    “Death”

    “Crouch_Up”

    300s
  • Q8

    Which of the following variable declarations observes Unity’s standard naming conventions (especially as it relates to capitalisation)?

    Question Image

    2 and 4

    3 and 6

    4 and 5

    1 and 5

    300s
  • Q9

    Which of the following is most likely the condition for the transition between “Run” and “Walk” shown below?

    Question Image

    Jump_b is true

    Speed_f is Less than 0.5

    Speed_f is Greater than 0.5

    Animation_int is Less than 10

    300s
  • Q10

    Which of the following do you think makes the most sense for a simple movement state machine?

    Question Image

    Image A

    Image B

    Image C

    300s

Teachers give this quiz to your class