QuestListContainer on disabled GO
Posted: Thu May 11, 2023 1:36 pm
I run into following situation when loading my game:
- First saver disables the object (it's an NPC that's temporarily hidden)
- Second saver loads quest list and calls AddQuest with delayStartup flag set to true
- Unity throws an error in AddQuest method because it won't allow calling StartCoroutine on an disabled GameObject.
I developed a workaround by keeping QuestList on a separate object that's always enabled, but I'm wondering if this could be somehow fixed in QuestMachine.
- First saver disables the object (it's an NPC that's temporarily hidden)
- Second saver loads quest list and calls AddQuest with delayStartup flag set to true
- Unity throws an error in AddQuest method because it won't allow calling StartCoroutine on an disabled GameObject.
I developed a workaround by keeping QuestList on a separate object that's always enabled, but I'm wondering if this could be somehow fixed in QuestMachine.