Unity腳本中有很多的事件函數,下面是各種函數的執行順序:
1.reset();
2.Awake();
3.OnEnable;
4.OnLevelWasLoaded();
5.Start();
6.OnApplicationPause();
7.FixedUpdate();
8.Update();
9.LateUpdate();
10.Rendering(渲染)類
11.Coroutines(協調程序)類
12.OnDestroy();
13.OnApplicationQuit();
14.OnDisable();
下圖是Unity社區官方給的循環周期流程圖: