Message System exception sending 'Quest State Changed'/'xxx' to Quest Machine
Posted: Fri Oct 11, 2019 6:54 pm
Have you got any idea what the exception below means?
Previously, I started a quest by sending a message and listening to it in Autostart. It worked, but I didn't wanna have to do this for each quest, so I wanted to instead start it directly from the quest, so I changed to:
First time it worked. But second play, I got the error below. questToStart is a reference to the MakeBurger quest asset in my project. Is that incorrect? Should I reference the instance in the quest journal, if so, how?
I don't know why this should work once and not more. Is there some event listener that weren't unsubscribed?
Thank you in advance!
Previously, I started a quest by sending a message and listening to it in Autostart. It worked, but I didn't wanna have to do this for each quest, so I wanted to instead start it directly from the quest, so I changed to:
Code: Select all
questToStart.SetState(QuestState.Active);
I don't know why this should work once and not more. Is there some event listener that weren't unsubscribed?
Thank you in advance!
Code: Select all
Message System exception sending 'Quest State Changed'/'Makeburger' to Quest Machine (BlueGoo.Quests.DisplayQuestStatusChange): Object reference not set to an instance of an object
UnityEngine.Debug:LogError(Object)
PixelCrushers.MessageSystem:SendMessageWithTarget(Object, Object, String, String, Object[]) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Message System/MessageSystem.cs:328)
PixelCrushers.MessageSystem:SendMessage(Object, String, StringField, Object[]) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Message System/MessageSystem.cs:424)
PixelCrushers.QuestMachine.QuestMachineMessages:QuestStateChanged(Object, StringField, QuestState) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Utility/QuestMachineMessages.cs:153)
PixelCrushers.QuestMachine.Quest:SetState(QuestState, Boolean) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest/Quest.cs:829)
PixelCrushers.QuestMachine.Quest:RuntimeStartup() (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest/Quest.cs:720)
PixelCrushers.QuestMachine.QuestListContainer:AddQuest(Quest) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestListContainer.cs:183)
PixelCrushers.QuestMachine.QuestJournal:AddQuest(Quest) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestJournal.cs:167)
PixelCrushers.QuestMachine.QuestListContainer:AddQuests(List`1) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestListContainer.cs:170)
PixelCrushers.QuestMachine.QuestListContainer:InstantiateQuestAssets() (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestListContainer.cs:140)
PixelCrushers.QuestMachine.QuestListContainer:Awake() (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestListContainer.cs:124)