Quiz 5

Quiz

Beginner

+60 XP

15m

Unity Technologies

Quiz 5 thumbnail

This quiz will assess your knowledge of the skills and concepts learned in Unit 5.

Question 1

Which of the following follows Unity naming conventions (especially as they relate to capitalization)?

Select only one

Question 2

If there is a boolean in script A that you want to access in script B, which of the following are true:

Select only one

Question 3

Which code to fill in the blank will result in the object being destroyed?

Select only one

Question 4

You run your game and get the following error message in the console, “NullReferenceException: Object reference not set to an instance of an object”. Given the image and code below, what would resolve the problem?

Select only one

Question 5

Read the Unity documentation below about the OnMouseDrag event and the code beneath it. What will the value of the “counter” variable be if the user clicked and held down the mouse over an object with a collider for 10 seconds?

Select only one

Question 6

Based on the code below, what will be displayed in the console when the button is clicked?

Select only one

Question 7

You have declared a new Button variable as “private Button start;”, but there’s an error under the word “Button” that says “error CS0246: The type or namespace name 'Button' could not be found (are you missing a using directive or an assembly reference?)” What is likely causing that error?

Select only one

Question 8

Look at the documentation and code below. Which of the following lines would NOT produce an error?

Select only one

Question 9

If you wanted a button to display the message, “Hello!” when a button was clicked, what code would you use to fill in the blank?

Select only one

Question 10

Which of the following is the correct way to declare a new List of game objects named “enemies”?

Select only one

Submit answers

To calculate your score, submit your answers to the quiz. A passing score will mark this quiz complete.

Correct answers needed to pass

1/10

Retake allowed after

0 Mins