Unity gMetrix Module 11

Unity gMetrix Module 11

12th Grade

5 Qs

quiz-placeholder

Similar activities

Keamanan Informasi

Keamanan Informasi

1st - 12th Grade

10 Qs

Create with Code Prototype 2 Quiz

Create with Code Prototype 2 Quiz

9th - 12th Grade

10 Qs

SQL Concept with Prac Q

SQL Concept with Prac Q

12th Grade

10 Qs

Multimedia Interaktif

Multimedia Interaktif

12th Grade - University

10 Qs

SQL- Join, Group by, having

SQL- Join, Group by, having

9th - 12th Grade

10 Qs

Unity Scripting Beginner (EN)

Unity Scripting Beginner (EN)

12th Grade - Professional Development

10 Qs

Java Script

Java Script

10th - 12th Grade

10 Qs

Soal Teknologi Layanan Jaringan kelas 12 semester 2 - Subnetting

Soal Teknologi Layanan Jaringan kelas 12 semester 2 - Subnetting

12th Grade

10 Qs

Unity gMetrix Module 11

Unity gMetrix Module 11

Assessment

Quiz

Computers

12th Grade

Medium

Created by

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

Media Image

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.