Page 1 of 1

QuestJournal "already registered" when reloading scene

Posted: Tue Aug 31, 2021 2:37 pm
by jakecard
Hi!

My game has a "main scene" which includes my QuestJournal. When I leave this scene and come back later, I get the following message:

Code: Select all

Quest Machine: A QuestListContainer with id 'quest-journal' is already registered. Can't register QuestJournal (PixelCrushers.QuestMachine.Wrappers.QuestJournal)
My QuestJournal lives on the same GameObject as my QuestMachineConfiguration, so it's a singleton that's kept alive between scenes, in case this helps.

Based on digging through the code, it looks like this error message is being caused by IdentifiableQuestListContainer.OnEnable() calling QuestMachine.RegisterQuestListContainer(this). This seems fairly straightforward and expected, so I assume I've set something up wrong (or that I should just ignore this error message or something). Could you please advise?

Re: QuestJournal "already registered" when reloading scene

Posted: Tue Aug 31, 2021 4:18 pm
by Tony Li
Hi,

Is the Quest Machine Configuration component's 'Allow Only Once Instance' checkbox still ticked?

Re: QuestJournal "already registered" when reloading scene

Posted: Wed Sep 01, 2021 10:30 am
by jakecard
Hi Tony,

Yep, it's still ticked. Here's a screenshot of the configuration game object in the inspector. Worth noting: I also put the QuestJournal component on this same object, since we don't have a "Player" game object. Let me know if this might be screwing things up.

Image

Re: QuestJournal "already registered" when reloading scene

Posted: Wed Sep 01, 2021 11:04 am
by Tony Li
Hi,

You aren't doing anything wrong. Turns out it's a script execution order issue. This patch should fix it:

QM_ConfigPatch_2021-09-01.unitypackage

Re: QuestJournal "already registered" when reloading scene

Posted: Wed Sep 01, 2021 12:13 pm
by jakecard
Awesome, thanks Tony! Will installing this patch play nicely when future QuestMachine updates are released, or will I have to re-apply it every time or something?

Re: QuestJournal "already registered" when reloading scene

Posted: Wed Sep 01, 2021 1:49 pm
by Tony Li
It'll play nicely. It's already in the repository for the next regular version release.

Re: QuestJournal "already registered" when reloading scene

Posted: Thu Sep 02, 2021 11:52 am
by jakecard
Awesome, thanks a bunch Tony! Appreciate the fix :)

Re: QuestJournal "already registered" when reloading scene

Posted: Thu Sep 02, 2021 1:36 pm
by Tony Li
Glad to help!