Lecture 1 Flashcards
Why are rectangular arrays preferred to jagged?
More efficient
Each GameObject contains a collection of _________
Components
What does
void Awake()
do?
The first function to be called, when the scene is loaded or the game object first becomes active
When is
start()
called?
Before the first frame update only if the script is enabled
When should physics calculations be done?
Why?
FixedUpdate()
Called at a regular interval, doesn’t rely on Time.deltaTime
When is update() called?
Every frame, before it is rendered
What does Time.deltaTime represent?
Time in seconds since last frame
When is LateUpdate() called?
Once per frame, once every Update() has been called
How can an object be destroyed?
void Destroy(Object obj, float t = 0.0f)
How can an object be deactivated/activated?
void SetActive(bool value);
How can a component be enabled/disabled?
bool Behaviour.enabled
set to true or false
What does the Invoke method allow you to do?
Invoke(string methodName, float time)
calls the method after given amount of time