Multi-Scene Work Flow and Script Execution Order
Posted: Fri Oct 14, 2022 2:50 am
Hey,
My project is setuped using Multiscene work flow like this:
QuestMachine's gameobject locate in Core scene and QuestGiver's gameobject, which is NPC, is in Level_Farm scene.
And my script execution order setup like this:
QuestMachine's Singleton QuestMachineConfiguration is -80 and should call Awake() before Questmachines's QuestGiver's Awake() function.
However, the result is not what I excepted, QuestGiver's Awake() is calld first and the following error will cause the questgiver stop functionning.
Can anyone help me to How do I make it right? Thanks.
Moreover, if I put QuestMachine's gameobject in the same scene with QuestGiver's gameobject. It will have the same error when Destroy the scene, QuestMachine's Destory() is called before QuestGiver's.
My project is setuped using Multiscene work flow like this:
QuestMachine's gameobject locate in Core scene and QuestGiver's gameobject, which is NPC, is in Level_Farm scene.
And my script execution order setup like this:
QuestMachine's Singleton QuestMachineConfiguration is -80 and should call Awake() before Questmachines's QuestGiver's Awake() function.
However, the result is not what I excepted, QuestGiver's Awake() is calld first and the following error will cause the questgiver stop functionning.
Can anyone help me to How do I make it right? Thanks.
Moreover, if I put QuestMachine's gameobject in the same scene with QuestGiver's gameobject. It will have the same error when Destroy the scene, QuestMachine's Destory() is called before QuestGiver's.