Unity gMetrix module 7

Quiz
•
Computers
•
12th Grade
•
Medium
Raymundo Martinez
Used 1+ times
FREE Resource
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Consider the following code: void Start() { for (int i = 0; i < 10; i++) { if (i < 5) { Debug.Log("X"); } else { Debug.Log("Y"); } } } How many times will the characters X and Y be printed to the Console?
5 X's and 5 Y's
0 X's and 10 Y's
4 X's and 6 Y's
6 X's and 4 Y's
Answer explanation
5 X's and 5 Y's will happen since you need to consider index 0 in the if statement condition.
2.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
What are the possible numbers that can be stored in the rnd variable? int rnd = Random.Range(1, 3);
0, 1, 2
1, 2, 3
2, 3
1, 2
Answer explanation
Only 1 and 2 are possibilities since Random.Range is exclusive when working with integers, so it will ignore the highest value.
3.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
True or False: The following array variable is properly declared. [SerializeField] Transform target[];
True
False
Answer explanation
False. The proper way is to add brackets to the type and not the name of the variable.
4.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Consider the following image:
The game is running, and the character is currently playing the Run animation state and increases the speed to 1.5. The user then presses the jump button and the JumpIsPressed parameter becomes true. Which animation state will be played on the following frame?
Entry
LongJump
Idle
Run
Answer explanation
Since one of the conditions is that xSpeed should be greater than 1.5 to transition into the LongJump animation state and the speed is exactly 1.5, the animation will
remain in the Run animation state.
5.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
When working with a raycast, you can get information from an object you hit with a ray. What type of variable can be used to store this data?
Hit
Physics
RaycastInfo
Answer explanation
Raycast information can be extracted and stored in a RaycastHit type of variable.
Similar Resources on Wayground
10 questions
Advanced Java Study Guide

Quiz
•
11th - 12th Grade
10 questions
Java Script

Quiz
•
10th - 12th Grade
10 questions
APCSP 3.7 Debugging

Quiz
•
9th - 12th Grade
10 questions
L5 Python Knowledge Quiz

Quiz
•
9th Grade - University
9 questions
Basic Python Coding

Quiz
•
6th - 12th Grade
9 questions
Python Basics Quiz for KS3

Quiz
•
11th Grade - University
9 questions
Python Basics

Quiz
•
6th - 12th Grade
10 questions
SDD HSC Quiz 4E Q1-10

Quiz
•
12th Grade
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade