0
0
Unityframework~5 mins

MonoBehaviour lifecycle in Unity - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the purpose of the Awake() method in a MonoBehaviour?

Awake() is called when the script instance is being loaded. It is used to initialize variables or states before the game starts. It runs even if the script component is disabled.

Click to reveal answer
beginner
When is the Start() method called in the MonoBehaviour lifecycle?

Start() is called before the first frame update, but only if the script component is enabled. It is used to set up things that depend on other objects being initialized.

Click to reveal answer
intermediate
What is the difference between Update() and FixedUpdate()?

Update() runs once per frame and is used for regular frame-based logic like input checking. FixedUpdate() runs at fixed time intervals and is used for physics calculations.

Click to reveal answer
intermediate
What does the OnEnable() method do in the MonoBehaviour lifecycle?

OnEnable() is called every time the script component is enabled or the GameObject it is attached to becomes active. It is useful for subscribing to events or resetting states.

Click to reveal answer
intermediate
Explain the role of OnDestroy() in MonoBehaviour.

OnDestroy() is called when the MonoBehaviour will be destroyed. It is used to clean up resources, unsubscribe from events, or save data before the object is removed.

Click to reveal answer
Which MonoBehaviour method is called only once when the script instance is loaded?
AUpdate()
BStart()
CFixedUpdate()
DAwake()
Which method is best for handling physics updates in Unity?
AFixedUpdate()
BUpdate()
CLateUpdate()
DOnEnable()
When is Start() called in the MonoBehaviour lifecycle?
ABefore the script instance is loaded
BBefore the first frame update if the script is enabled
CEvery frame
DWhen the object is destroyed
What happens when OnEnable() is called?
AThe script component or GameObject becomes active
BThe frame updates
CThe object is destroyed
DThe script instance is loaded
Which method should you use to clean up resources before an object is removed?
AAwake()
BStart()
COnDestroy()
DUpdate()
Describe the order of MonoBehaviour lifecycle methods from object creation to destruction.
Think about what happens when the object is created, enabled, updated, disabled, and destroyed.
You got /6 concepts.
    Explain when and why you would use FixedUpdate() instead of Update().
    Consider timing and physics calculations.
    You got /4 concepts.