我创建了两个简单的脚本(ScriptA 和 ScriptB)。两者都包含 Start() 方法。 我发现后者总是先开始。这是Unity正常的做法吗?
最佳答案
By default, the Awake, OnEnable and Update functions of different scripts are called in the order the scripts are loaded (which is arbitrary). However, it is possible to modify this order using the Script Execution Order settings (menu: Edit > Project Settings > Script Execution Order).
关于c# - Unity - 如果我使用自己的 Start() 方法创建两个脚本,哪一个将首先调用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41719884/