
Unity Unit 2 Quiz
Quiz
•
Computers
•
12th Grade
•
Practice Problem
•
Medium
Jay VanRyzin
Used 4+ times
FREE Resource
Enhance your content in a minute
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If it says, "Hello there!" in the console, what was the code used to create that message?
Debug("Hello there!")
Debug.Log("Hello there!")
Debug.Console("Hello there!")
Debug.Log(Hello there!)
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If you want to destroy an object when its health reaches 0, what code would be best in the blank below?
health > 0
health.0
health < 1
health<0
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which comment best describes the following code?
If player collides with another object, destroy player
If enemy collides with another object, destroy the object
If player collides with a trigger, destroy trigger
If player collides with another object, destroy the object
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If you want to move the character up continuously as the player presses the up arrow, what code would be best in the two blanks below:
if (Input.________________(______________))
{
transform.Translate(Vector3.up);
}
GetKey(KeyCode.UpArrow)
GetKeyDown(UpArrow)
GetKeyUp(KeyCode.Up)
GetKeyHeld(Vector3.Up)
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Read the documentation from the Unity Scripting API and the code below. Which of the following are possible values for the randomFloat and randomInt variables? public static float Range(float min, float max); public static int Range(int min, int max);
randomFloat = 100.0f; randomInt = 0;
randomFloat = 100.0f; randomInt = 100;
randomFloat = 50.5f; randomInt = 100;
randomFloat = 0.0f; randomInt = 50.5;
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
You are trying to randomly spawn objects from an array. However, when your game is running, you see in the console that there was an 'error at Assets/Scripts/SpawnManager.cs:5. IndexOutOfRangeException: Index was outside the bounds of the array.' Which line of code should you edit in order to resolve this problem and still retain the random object functionality?
Line 2
Line 3
Line 4
Line 5
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If you have made changes to a prefab in the scene and you want to apply those changes to all prefabs, what should you click?
The 'Create' drop-down at the top of the Hierarchy
The 'Open' button at the top of the Inspector
The 'Overrides' drop-down at the top of the Inspector
The 'Add Component' button at the bottom of the Inspector
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
11 questions
Youtube
Quiz
•
4th Grade - University
12 questions
Windows 10 Installation
Quiz
•
11th - 12th Grade
11 questions
Python Function
Quiz
•
11th - 12th Grade
10 questions
python quiz
Quiz
•
6th Grade - Professio...
10 questions
Scratch
Quiz
•
KG - Professional Dev...
10 questions
Von Neumann Vs Harvard Architecture
Quiz
•
12th Grade
10 questions
What is a program slides(6:16)
Quiz
•
8th - 12th Grade
10 questions
Java: repetition control structure for & while
Quiz
•
10th - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
