- Home /
what is the order of execution of functions at object creation?
what is the order of execution at object creation?
Answer by Mike 3 · May 16, 2010 at 02:03 PM
http://www.unifycommunity.com/wiki/index.php?title=Event_Execution_Order
Awake then OnEnable for each object individually, instead of all Awakes, followed by all OnEnables
good answer mike. thank you! what was your source? did you try it all? hopefully in next release unity will have complete details about engine internals.
Tried it all, a lot - the only issue is that i've heard it's slightly different if you're on iPhone - hopefully they'll fix that in Unity 3
Answer by Ashkan_gc · May 16, 2010 at 01:04 PM
first Awake will execute then OnEnable and then Start. i am not sure if all other OnEnabls execute after your your awake but your own OnEnable will execute after your Awake and it's safe to use Awake for initializations of those variables that you use in OnEnable.
Your answer
![](https://koobas.hobune.stream/wayback/20220613000919im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
How to implement "PreUpdate" function 4 Answers
How to import the object from server to unity 2 Answers
How should scripts cache a function result each frame? 1 Answer
Can someone help me fix my Javascript for Flickering Light? 6 Answers