Introduction to MonoBehaviour Class - Unity Scripting API Tutorial 01

Published: 31 October 2024
on channel: GameLabBD
35
3

MonoBehaviour class
is a base class from which every Unity script is derived.

Note: Every Unity script extends the MonoBehaviour class.

Why Unity scripts extend from MonoBehaviour class?
Because: Unity calls and executes various event methods in a pre-determined order.
Example:
Start()
called just before the first Update call.
Update():
called every frame continuously.
Awake():
called when a script is instantiated.
OnEnable():
called whenever a script is enabled.
OnCollisionEnter():
called whenever two colliders hit each other.
OnApplicationQuit():
called when user quits the application.
OnDisable():
called whenever a script is disabled.
OnDestroy():
called when an object is destroyed.


On this page of the site you can watch the video online Introduction to MonoBehaviour Class - Unity Scripting API Tutorial 01 with a duration of hours minute second in good quality, which was uploaded by the user GameLabBD 31 October 2024, share the link with friends and acquaintances, this video has already been watched 35 times on youtube and it was liked by 3 viewers. Enjoy your viewing!