Unity脚本执行顺序
2016-04-23 20:17
621 查看
初学Unity,对着Unity官方教程学习的时候,发现自己写的脚本执行顺序与示例不同。网上找了一些答案,没有找到为什么会这样。后来发现Unity官方对脚本运行顺序有说明:
By default, the Awake, OnEnable and Update functions of different scripts are called in the order the scripts are loaded (which is arbitrary).
意思大概是:不同脚本的Awake等函数的执行顺序是由脚本的加载顺序决定的。(加载顺序是随意的)
但是也可以手动修改这个执行顺序,(menu: Edit > Project Settings > Script Execution Order)
By default, the Awake, OnEnable and Update functions of different scripts are called in the order the scripts are loaded (which is arbitrary).
意思大概是:不同脚本的Awake等函数的执行顺序是由脚本的加载顺序决定的。(加载顺序是随意的)
但是也可以手动修改这个执行顺序,(menu: Edit > Project Settings > Script Execution Order)
相关文章推荐
- blenderImportToUnity
- MAC下双开UNITY
- unity Tween相关
- Unity3D使用NGUI实现简单背包功能
- Unity3D使用NGUI实现简单背包功能
- Unity3D- 自动寻路
- unity3d之工程性能提升注意点
- unity delegate事件委托
- unity 坐标系
- Unity3d-数学-游戏数学基础-未完结
- Unity5利用Monodevelop调试Unity
- C4D to Unity3D插件C2U Tool开源发布!简化你的工作流
- unity中的jsp函数 控制角色移动transform.Translate
- Unity进阶技巧 - RectTransform详解
- Unity Shaders and Effects Cookbook (4-4)在Cubemap 上使用 法线贴图 (法线贴图与反射)
- 【Unity闲谈】用快捷键清空Unity的控制台
- Unity3D 声音格式和导入
- Unity 绘图性能优化 - Draw Call Batching
- Unity3D入门
- unity用链表来实现贪吃蛇