GameObject update order in Unity

*爱你&永不变心* 提交于 2019-12-03 17:34:32

I built a small test project in Unity which basically consists of a 3x3x3 tree of GameObjects, each having 3 scripts.

I found the following answers:

  1. No. Some GameObjects can be considered before their parents are, while some parents can be considered before their children are. And this order can change when reloading the scene or manipulating the scene graph.
  2. No. Siblings can be updated in any order. This order can change when reloading the scene or manipulating the scene graph.
  3. It is enforced over all GameObjects in the scene. If SEO sets script A to be executed before script B, then all instances of script A will be considered before any instance of script B is. Meaning, all instances of A call their Awake() before any B call their Awake(), then all instances of A call their Start() before any instance of B call their Start() and so on.
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!