Unity Magic Functions / Script Lifecycle Methods

preview_player
Показать описание
Everyone knows about Start and Update in your Unity scripts, but how do they work? Are there any others? When do they get called?

In this Unity Tutorial we'll cover the basics of how many Magic Functions there are and how they work.

✨Want to support the channel?

➤SUBSCRIBE to be an OnPreCull master like me 💅

➤LIKE the video if you enjoyed, it really helps the channel!

Thanks for watching!

#unity #tutorial #bmo
Рекомендации по теме
Комментарии
Автор

"I bet you didn't know OnPreCull existed until now." LOL!! You're not wrong.

suicune
Автор

Seems like unity really is the sauce right now

Stompin
Автор

OnSubscribe to the one and only unity magician BMo 💅

mandamoon
Автор

*grabs notebook and pen* I think I found my new knowledge corner of YouTube for a while. Super knowledgeable! Can't wait to see more!

audajostudios
Автор

Thanks! One issue I've run into sometimes in my own projects is OnCollisionEnter being called twice even though you only touched the object once.

suicune
Автор

Welp, I guess that function was called

MrAres
Автор

* Sees subscribe function *
* Expects youtube subscribe get one.*

* Thinks it's safe *
BMo: 7:47

Tentegen
Автор

I will defenitely take a look on the unity document what faction the have I already use those you say on video but is very likely to be other useful method I don't know about

watercat
Автор

can you upload a tutorial on making top-down dash mechanic?

josepho
Автор

Well its more that Monobehavior is a Class that's being strictly inherited from the Unity.Engine Namespace and Start, Update, ect.. are already declared functions within the Monobehavior class Event Method. You cant declare Methods or Functions that are already declared to prevent conflict unless you provide an [override] telling the program to use MyClass Start over the Monobehavior>Event>Start function. This is usually why people may use OnStart or MyStart to distinguish the two.

OnApplicationQuit would be useful for an autosave for in case of a crash.

DeathxStrike