What does the 'GetComponent<T>()' method do in Unity?

C sharp 2024

Quiz
•
Other
•
12th Grade
•
Medium
Michael Hippo
Used 29+ times
FREE Resource
57 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
It adds a new component of type T to the game object.
It finds and returns the first active loaded object of Type T.
It returns the component of Type T if the game object has one attached, null if it doesn't.
It deletes the component of Type T from the game object.
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
When you Edit a Prefab Instance, the Inspector window provides options for working with the Prefab Asset and applying overrides.
t
f
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which parameter is for the animator function shown: ("Animation");
SetBool
SetFloat
SetInt
SetTrigger
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
vChoose the best comment for this code:
Adds things to a new list
Adds t to a list
Adds a single object
Adds objects to a new list for each object in "myList"
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Write code that states: if coins equal 100 or 150 give an extra life. (Hint: need to know symbol for "or" and "equals".
if (coins == 100 || coins == 150) { lives += 1; }
if (coins = 100 % coins = 150) { lives += 1; }
if (coins AND 100 OR coins AND 150) { lives += 1; }
if (coins += 100 | coins += 150) { lives += 1; }
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Input.GetMouseButtonDown(1)
Returns true if the left mouse button was pressed.
Returns true if the middle mouse button was pressed.
Returns true if the right mouse button was pressed.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which checkbox tells Unity an object will be stationary?
Move Tool
Static
Grid Snapping
Rigidbody Component
Create a free account and access millions of resources
Similar Resources on Wayground
55 questions
Unit 1 Review

Quiz
•
12th Grade
60 questions
National 5 Bus Mgt Finance

Quiz
•
KG - University
54 questions
Chap 33. Drum Brakes

Quiz
•
11th - 12th Grade
60 questions
The gaming quiz

Quiz
•
12th Grade
55 questions
Higher Graphics_Revision Quiz 1

Quiz
•
12th Grade
61 questions
Advanced Accounting S1 Mid-Term Exam Review

Quiz
•
12th Grade
60 questions
Verifica 25novembre2019

Quiz
•
12th Grade
60 questions
Tool ID Pre-Test

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
25 questions
Equations of Circles

Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)

Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System

Quiz
•
10th Grade
10 questions
Writing and Identifying Ratios Practice

Quiz
•
5th - 6th Grade
36 questions
Prime and Composite Numbers

Quiz
•
5th Grade
14 questions
Exterior and Interior angles of Polygons

Quiz
•
8th Grade
37 questions
Camp Re-cap Week 1 (no regression)

Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review

Quiz
•
10th Grade