Lecture 1 Flashcards

1
Q

Why are rectangular arrays preferred to jagged?

A

More efficient

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Each GameObject contains a collection of _________

A

Components

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does

void Awake()

do?

A

The first function to be called, when the scene is loaded or the game object first becomes active

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

When is

start()

called?

A

Before the first frame update only if the script is enabled

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

When should physics calculations be done?

Why?

A

FixedUpdate()

Called at a regular interval, doesn’t rely on Time.deltaTime

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

When is update() called?

A

Every frame, before it is rendered

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does Time.deltaTime represent?

A

Time in seconds since last frame

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

When is LateUpdate() called?

A

Once per frame, once every Update() has been called

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How can an object be destroyed?

A

void Destroy(Object obj, float t = 0.0f)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How can an object be deactivated/activated?

A

void SetActive(bool value);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How can a component be enabled/disabled?

A

bool Behaviour.enabled

set to true or false

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does the Invoke method allow you to do?

A

Invoke(string methodName, float time)

calls the method after given amount of time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly