Issue with saving system and Topdown integration
Posted: Tue Nov 12, 2024 12:04 pm
Hi
I have setup the Quest Machine and created handwritten quests together with the topdown engine. Which are working good. Now I what to be able to jump back and forth between scenes while keeping track of the quests. I have setup the saving system and it works kind of ... It does remember the progress across the scenes but I get both error and warning.
NullReferenceExecebtion error:
NullReferenceException: Object reference not set to an instance of an object
PixelCrushers.QuestMachine.QuestJournal.VerifyTrueNodeChildrenAreActive () (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestJournal.cs:264)
PixelCrushers.QuestMachine.QuestJournal.ApplyData (System.String data) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestJournal.cs:255)
PixelCrushers.SaveSystem.ApplySavedGameData (PixelCrushers.SavedGameData savedGameData) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:912)
UnityEngine.Debug:LogException(Exception)
PixelCrushers.SaveSystem:ApplySavedGameData(SavedGameData) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:917)
PixelCrushers.TopDownEngineSupport.SaveSystemTopDownEventListener:Load() (at Assets/Pixel Crushers/Common/Third Party Support/TopDown Engine Support/Scripts/SaveSystemTopDownEventListener.cs:59)
PixelCrushers.TopDownEngineSupport.SaveSystemTopDownEventListener:OnMMEvent(MMGameEvent) (at Assets/Pixel Crushers/Common/Third Party Support/TopDown Engine Support/Scripts/SaveSystemTopDownEventListener.cs:42)
MoreMountains.Tools.MMEventManager:TriggerEvent(MMGameEvent) (at Assets/TopDownEngine/ThirdParty/MoreMountains/MMTools/Core/MMEvents/MMEventManager.cs:181)
MoreMountains.Tools.MMGameEvent:Trigger(String, Int32, Vector2, Vector3, Boolean, String) (at Assets/TopDownEngine/ThirdParty/MoreMountains/MMTools/Core/MMEvents/MMEventManager.cs:37)
MoreMountains.TopDownEngine.<InitializationCoroutine>d__41:MoveNext() (at Assets/TopDownEngine/Common/Scripts/Managers/LevelManager.cs:177)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
MoreMountains.TopDownEngine.LevelManager:Start() (at Assets/TopDownEngine/Common/Scripts/Managers/LevelManager.cs:136)
And warning:
Quest Machine: A QuestListContainer with id 'Player1' is already registered. Can't register ANR_LargeAlienCharacter Green(Clone) (PixelCrushers.QuestMachine.Wrappers.QuestJournal)
UnityEngine.Debug:LogWarning (object,UnityEngine.Object)
PixelCrushers.QuestMachine.QuestMachine:RegisterQuestListContainer (PixelCrushers.QuestMachine.IdentifiableQuestListContainer) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest Machine/QuestMachine.cs:136)
PixelCrushers.QuestMachine.IdentifiableQuestListContainer:OnEnable () (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/IdentifiableQuestListContainer.cs:111)
PixelCrushers.QuestMachine.QuestJournal:OnEnable () (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestJournal.cs:111)
UnityEngine.Object:Instantiate<MoreMountains.TopDownEngine.Character> (MoreMountains.TopDownEngine.Character)
MoreMountains.TopDownEngine.CharacterSwitchManager:InstantiateCharacters () (at Assets/TopDownEngine/Common/Scripts/Managers/CharacterSwitchManager.cs:64)
MoreMountains.TopDownEngine.CharacterSwitchManager:Start () (at Assets/TopDownEngine/Common/Scripts/Managers/CharacterSwitchManager.cs:51)
I can see in the DontDestroyOnload the Questmachines creates a double when going back to the original scene.
Do you have an approach to how i could fix or troubleshoot the issue?
I think I have followed the guides and I do not have that much else going on in the project yet I have three scenes plus the loadingscene. First scene will hold the Quest Machine Manager including the Quest Machine Canvas. Do I need to split it up?
hope you can help
Kind regards
Peter
I have setup the Quest Machine and created handwritten quests together with the topdown engine. Which are working good. Now I what to be able to jump back and forth between scenes while keeping track of the quests. I have setup the saving system and it works kind of ... It does remember the progress across the scenes but I get both error and warning.
NullReferenceExecebtion error:
NullReferenceException: Object reference not set to an instance of an object
PixelCrushers.QuestMachine.QuestJournal.VerifyTrueNodeChildrenAreActive () (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestJournal.cs:264)
PixelCrushers.QuestMachine.QuestJournal.ApplyData (System.String data) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestJournal.cs:255)
PixelCrushers.SaveSystem.ApplySavedGameData (PixelCrushers.SavedGameData savedGameData) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:912)
UnityEngine.Debug:LogException(Exception)
PixelCrushers.SaveSystem:ApplySavedGameData(SavedGameData) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:917)
PixelCrushers.TopDownEngineSupport.SaveSystemTopDownEventListener:Load() (at Assets/Pixel Crushers/Common/Third Party Support/TopDown Engine Support/Scripts/SaveSystemTopDownEventListener.cs:59)
PixelCrushers.TopDownEngineSupport.SaveSystemTopDownEventListener:OnMMEvent(MMGameEvent) (at Assets/Pixel Crushers/Common/Third Party Support/TopDown Engine Support/Scripts/SaveSystemTopDownEventListener.cs:42)
MoreMountains.Tools.MMEventManager:TriggerEvent(MMGameEvent) (at Assets/TopDownEngine/ThirdParty/MoreMountains/MMTools/Core/MMEvents/MMEventManager.cs:181)
MoreMountains.Tools.MMGameEvent:Trigger(String, Int32, Vector2, Vector3, Boolean, String) (at Assets/TopDownEngine/ThirdParty/MoreMountains/MMTools/Core/MMEvents/MMEventManager.cs:37)
MoreMountains.TopDownEngine.<InitializationCoroutine>d__41:MoveNext() (at Assets/TopDownEngine/Common/Scripts/Managers/LevelManager.cs:177)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
MoreMountains.TopDownEngine.LevelManager:Start() (at Assets/TopDownEngine/Common/Scripts/Managers/LevelManager.cs:136)
And warning:
Quest Machine: A QuestListContainer with id 'Player1' is already registered. Can't register ANR_LargeAlienCharacter Green(Clone) (PixelCrushers.QuestMachine.Wrappers.QuestJournal)
UnityEngine.Debug:LogWarning (object,UnityEngine.Object)
PixelCrushers.QuestMachine.QuestMachine:RegisterQuestListContainer (PixelCrushers.QuestMachine.IdentifiableQuestListContainer) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest Machine/QuestMachine.cs:136)
PixelCrushers.QuestMachine.IdentifiableQuestListContainer:OnEnable () (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/IdentifiableQuestListContainer.cs:111)
PixelCrushers.QuestMachine.QuestJournal:OnEnable () (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestJournal.cs:111)
UnityEngine.Object:Instantiate<MoreMountains.TopDownEngine.Character> (MoreMountains.TopDownEngine.Character)
MoreMountains.TopDownEngine.CharacterSwitchManager:InstantiateCharacters () (at Assets/TopDownEngine/Common/Scripts/Managers/CharacterSwitchManager.cs:64)
MoreMountains.TopDownEngine.CharacterSwitchManager:Start () (at Assets/TopDownEngine/Common/Scripts/Managers/CharacterSwitchManager.cs:51)
I can see in the DontDestroyOnload the Questmachines creates a double when going back to the original scene.
Do you have an approach to how i could fix or troubleshoot the issue?
I think I have followed the guides and I do not have that much else going on in the project yet I have three scenes plus the loadingscene. First scene will hold the Quest Machine Manager including the Quest Machine Canvas. Do I need to split it up?
hope you can help
Kind regards
Peter