Unity Magic Functions / Script Lifecycle Methods
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.
UNITY EVENT FUNCTION ORDER CHART: docs.unity3d.com/Manual/Execu...
✨Want to support the channel?
Buy me a coffee ☕: ko-fi.com/bmoli
➤SUBSCRIBE to be an OnPreCull master like me 💅
➤LIKE the video if you enjoyed, it really helps the channel!
➤Join our DISCORD SERVER its a magical place: / discord
Thanks for watching!
#unity #tutorial #bmo
Пікірлер: 20
"I bet you didn't know OnPreCull existed until now." LOL!! You're not wrong.
OnSubscribe to the one and only unity magician BMo 💅
Seems like unity really is the sauce right now
*grabs notebook and pen* I think I found my new knowledge corner of KZread for a while. Super knowledgeable! Can't wait to see more!
Привет! Желаю удачи мой друг
Excellent explanation Thanks
Awesome video!
* Sees subscribe function * * Expects youtube subscribe joke........doesn't get one.* * Thinks it's safe * BMo: 7:47
@BMoDev
2 жыл бұрын
Its never safe.
Your videos are great.
@BMoDev
2 жыл бұрын
thank you!
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.
Welp, I guess that function was called
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
can you upload a tutorial on making top-down dash mechanic?
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.
OnSubscribe()
pp