Unity Component and Script Functions

Unity Component and Script Functions

Assessment

Interactive Video

Computers

9th - 10th Grade

Hard

Created by

Amelia Wright

FREE Resource

The video tutorial introduces Unity components, explaining their purpose and how to create custom components using C# scripts. It covers the MonoBehaviour class, detailing its default functions like Start, Update, and Awake. The tutorial also discusses lifecycle events such as OnEnable and OnDisable, and how to expose fields to the Unity editor. Finally, it explains managing script execution order to ensure specific initialization sequences.

Read more

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary purpose of a component in Unity?

To add functionality to game objects

To manage game settings

To create animations

To render graphics

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which class must a custom component script extend in Unity?

ScriptableObject

Component

MonoBehaviour

GameObject

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the main difference between Start and Awake functions?

Awake runs as soon as the component is initialized

Awake runs only if the script is enabled

Start runs multiple times per frame

Start runs before Awake

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which Update function is best suited for physics-related changes?

Update

LateUpdate

FixedUpdate

Start

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How often does the FixedUpdate function run by default?

Once per second

Every frame

Every 20 milliseconds

Only when called

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens when a component is disabled in Unity?

The component's Awake function is called

The component's OnDisable function is called

The game crashes

The component is deleted

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you expose a private field to the Unity editor?

By making it public

By using the SerializeField attribute

By using the ExposeField attribute

By adding it to the inspector

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?