Introduction to MonoBehaviour Class - Unity Scripting API Tutorial 01

Publicado el: 31 octubre 2024
en el canal de: Learn With GM
29
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.


En esta página del sitio puede ver el video en línea Introduction to MonoBehaviour Class - Unity Scripting API Tutorial 01 de Duración hora minuto segunda en buena calidad , que subió el usuario Learn With GM 31 octubre 2024, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 29 veces y le gustó 3 a los espectadores. Disfruta viendo!