Unity gMetrix Module 11

Quiz
•
Computers
•
12th Grade
•
Medium
Raymundo Martinez
Used 1+ times
FREE Resource
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code: public class Employee : MonoBehaviour{ public int employeeId = 10; public int employeeAge = 35; public int GetEmployeeId(){ return 10; } } If you want to access the employeeId value from another script on the same GameObject, which is the proper way to do it?
GetComponent<Employee>(.employeeld = 5;
GetComponent<MonoBehaviour>().Employeeld = 5;
gameObject.Employee.Employeeld = 5;
Employee.employeeId = 5;
Answer explanation
GetComponent is how you can get a reference of a Component. If the Component is on the same GameObject, you don't need a reference to another GameObject. You
would use GetComponent<Employee>().employeeld = 5; to get the employeeld value.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a custom word that can be assigned to a GameObject to create a custom identifier?
Mark
Id
Label
Tag
Answer explanation
Tags are word-based custom identifiers you can add to a GameObject.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
When the game starts playing in the editor, the following message is shown in the Console window: "Hello World!". Which of the following lines of code will generate that message if added to the Start method?
Debug.Log("Hello World" + !);
Debug.Log("Hello World" + "!");
Debug.Log(Hello World!)
Debug.Log("HelloWorld" + "!");
Answer explanation
Debug.Log("Hello World" + "!"); is the only line of code that will generate that message.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following components receives input for any given AudioSource in a scene?
Audio Listener
Audio Mixer
Audio Manager
Audio Clip
Answer explanation
Audio Listeners are capable of receiving input from Audio Sources and playing the sound through speakers.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Considering the following image and code, the press of the button will cause currentHealth to increase by one.
Button addHealth;
int currentHealth;
private void Start()
{
addHealth.onClick.AddListener(IncreaseHealth);
}
void IncreaseHealth() {
currentHealth++;
}
True
False
Answer explanation
Button events can be added on the Inspector and also through code.
Similar Resources on Wayground
10 questions
SQL Concept with Prac Q

Quiz
•
12th Grade
10 questions
Multimedia Interaktif

Quiz
•
12th Grade - University
10 questions
SQL- Join, Group by, having

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

Quiz
•
10th - 12th Grade
10 questions
Soal Teknologi Layanan Jaringan kelas 12 semester 2 - Subnetting

Quiz
•
12th Grade
10 questions
APP Design

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

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

Quiz
•
12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade