Page 1 of 1

Multi-Scene Work Flow and Script Execution Order

Posted: Fri Oct 14, 2022 2:50 am
by roronoazaoxl
Hey,

My project is setuped using Multiscene work flow like this:

Image

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:

Image

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.
questmechina_error.jpg
questmechina_error.jpg (61.7 KiB) Viewed 547 times
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.

Re: Multi-Scene Work Flow and Script Execution Order

Posted: Fri Oct 14, 2022 8:16 am
by Tony Li
Hi,

What version of Unity are you using?

In any case, we'll need to make some adjustments internally to the Awake() and Start() methods in the next release of Quest Machine to handle this version of Unity. I'll post a patch here when it's ready, by the end of the weekend.

Re: Multi-Scene Work Flow and Script Execution Order

Posted: Sat Oct 15, 2022 11:15 pm
by roronoazaoxl
Thanks, I am using 2022.1.14f1.

It is not a stable version yet :( , but thanks for your help!

Re: Multi-Scene Work Flow and Script Execution Order

Posted: Sun Oct 16, 2022 9:14 pm
by Tony Li
Please let me know if this patch fixes the issue:

QM_Patch_2022-10-16.unitypackage
  • It should fix the execution order issue.
  • Fixed: When reverting quest to inactive state, now properly resets quest conditions.
  • Fixed: Issue when loading a hand-written quest from saved game where quest asset's conditions list has changed since save.