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.
Sur cette page du site, vous pouvez voir la vidéo en ligne Introduction to MonoBehaviour Class - Unity Scripting API Tutorial 01 durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur GameLabBD 31 octobre 2024, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 35 fois et il a aimé 3 téléspectateurs. Bon visionnage!