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.
Nesta página do site você pode assistir ao vídeo on-line Introduction to MonoBehaviour Class - Unity Scripting API Tutorial 01 duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Learn With GM 31 Outubro 2024, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 29 vezes e gostou 3 espectadores. Boa visualização!