QuestListContainer on disabled GO

Announcements, support questions, and discussion for Quest Machine.
Post Reply
szczepan
Posts: 5
Joined: Thu May 11, 2023 1:12 pm

QuestListContainer on disabled GO

Post by szczepan »

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.
User avatar
Tony Li
Posts: 20737
Joined: Thu Jul 18, 2013 1:27 pm

Re: QuestListContainer on disabled GO

Post by Tony Li »

Here's a patch. My thinking was that quest list containers (quest givers, quest journals, etc.) should be active when adding quests. But that's not technically a requirement.

QM_QuestListContainerPatch_2023-05-11.unitypackage
szczepan
Posts: 5
Joined: Thu May 11, 2023 1:12 pm

Re: QuestListContainer on disabled GO

Post by szczepan »

Thanks
User avatar
Tony Li
Posts: 20737
Joined: Thu Jul 18, 2013 1:27 pm

Re: QuestListContainer on disabled GO

Post by Tony Li »

Glad to help! This change will be in the next full release, too.
Post Reply