The diff between Awake,Start And OnEnable

来源:互联网 发布:团购软件 编辑:程序博客网 时间:2024/04/25 13:26
The order of Awake/Start/OnEnable is :
1.Awake first.  This function was called when all game object are loaded.   note that : this function is called only once since the scene is started.
2.OnEnable Secondly. OnEnable is called when a game object or script is active or enable. This function can be called serval times between the scene running.
3.Start finally.This function was called after the two function above. This function can only be called once whatever the game object or script was enable or active.
0 0
原创粉丝点击