Unity gMetrix Module 8

Quiz
•
Computers
•
12th Grade
•
Hard
Raymundo Martinez
Used 1+ times
FREE Resource
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
10 mins • 1 pt
Which of the following methods is a loop automatically called by Unity and is great for performing physics operations because the time between each call is consistent?
FixedUpdate
UpdatePhysics
UpdateFixed
Update
Answer explanation
FixedUpdate works great with physics because the time between calls is always the same.
2.
MULTIPLE CHOICE QUESTION
10 mins • 1 pt
A programmer is trying to create some simple code to print the player's name. However, the following error is being printed to the Console: "UnassignedReferenceException: The variable player of PrintPlayerName has not been assigned." Why is this happening?
The player GameObject was not assigned in the Inspector.
The GameObject does not have a name field inside.
The wrong GameObject was assigned in the Inspector.
The player variable should be public to be able to assign it in the Inspector.
Answer explanation
The error is occurring because the player GameObject was not assigned in the Inspector. Trying to access a serialized field will cause an UnassignedReferenceException
when not assigned in the Inspector.
3.
MULTIPLE CHOICE QUESTION
10 mins • 1 pt
Consider the following two classes:
Why is the Console window showing the error "'car.speed' is inaccessible due to its protection level"?
The car variable in GameController should be public.
The speed variable in the Car class is not serialized.
The GameController class should inherit from the Car class.
The speed variable in the Car class needs a public access modifier.
Answer explanation
To access a field in a different class, there needs to be a public access modifier.
4.
MULTIPLE CHOICE QUESTION
10 mins • 1 pt
Consider the following code:
The Console is showing the following error: "Cannot implicitly convert type 'float' to 'int'. An explicit conversion exists (are you missing a cast)?" What is causing this error?
The playerSpeed variable can only store integer values.
It is impossible to cast a float value into an integer value.
Float values do not require an "f" suffix when using integer type.
The speed of the player is a float value, but Unity only accepts integers values for speed.
Answer explanation
The playerSpeed variable can only store integer values. To store a number with decimals, we need to use the proper variable type, such as a float.
5.
MULTIPLE CHOICE QUESTION
10 mins • 1 pt
You are trying to get a reference to a Text element on the UI using the Inspector window with the following code:
[SerializeField] Text myUIText;
However, the following error is appearing: "The type or namespace name 'Text' could not be found (are you missing a using directive or an assembly reference)?" What is causing this error?
To get a reference using the Inspector, variables should be public.
The namespace UnityEngine.UI is not imported into the script.
The Text class does not exist.
The type Text should be all lowercase.
Answer explanation
The class Text can only be used when namespace UnityEngine.Ul is added to the top of the script.
Similar Resources on Wayground
10 questions
Intro to Python

Quiz
•
KG - University
10 questions
Technical Terms - Internet (A-Z) - SPF

Quiz
•
12th Grade
5 questions
Unity gMetrix Module 10

Quiz
•
12th Grade
10 questions
Software Design and Development Quick Quiz 2

Quiz
•
11th - 12th Grade
10 questions
GDScript Quiz - Lesson 2 - Variables & Functions

Quiz
•
12th Grade
10 questions
Technical Terms - Internet (A-Z) - Lag

Quiz
•
12th Grade
10 questions
Jakob Nielsen's 10 Usability Heuristics

Quiz
•
10th Grade - University
10 questions
Unit 1 Review AP CSP

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
Discover more resources for Computers
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
62 questions
Spanish Speaking Countries, Capitals, and Locations

Quiz
•
9th - 12th Grade
20 questions
First Day of School

Quiz
•
6th - 12th Grade
6 questions
Maier - AMDM - Unit 1 - Quiz 1 - Estimation

Quiz
•
12th Grade
21 questions
Arithmetic Sequences

Quiz
•
9th - 12th Grade
21 questions
9th Grade English Diagnostic Quiz

Quiz
•
9th - 12th Grade
7 questions
Characteristics of Life

Interactive video
•
11th Grade - University