Have been working on setting up saving and loading and am mostly there, but having a couple of problems with dialogue system post loading.
In this case, in scene A a conversation starts and a quest is set active. The game is then saved, and the scene switches to scene B. Everything works fine until the game stopped, saved and loaded. When that happens, entering a dialogue trigger collider causes an error. Here's the error information:
Code: Select all
KeyNotFoundException: The given key was not present in the dictionary.
System.Collections.Generic.Dictionary`2[Language.Lua.LuaValue,Language.Lua.LuaValue].get_Item (Language.Lua.LuaValue key) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:150)
Language.Lua.LuaTable.GetValue (Int32 index) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Lua/Lua Interpreter/LuaValue/LuaTable.cs:273)
PixelCrushers.DialogueSystem.DialogueLua.GetSimStatusTable (Int32 conversationID, Int32 entryID) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Model/Logic/DB/DialogueLua.cs:169)
PixelCrushers.DialogueSystem.DialogueLua.MarkDialogueEntry (PixelCrushers.DialogueSystem.DialogueEntry dialogueEntry, System.String status) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Model/Logic/DB/DialogueLua.cs:240)
PixelCrushers.DialogueSystem.DialogueLua.MarkDialogueEntryDisplayed (PixelCrushers.DialogueSystem.DialogueEntry dialogueEntry) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Model/Logic/DB/DialogueLua.cs:204)
PixelCrushers.DialogueSystem.ConversationModel.GetState (PixelCrushers.DialogueSystem.DialogueEntry entry, Boolean includeLinks, Boolean stopAtFirstValid, Boolean skipExecution) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Model/Logic/Model/ConversationModel.cs:228)
PixelCrushers.DialogueSystem.ConversationModel..ctor (PixelCrushers.DialogueSystem.DialogueDatabase database, System.String title, UnityEngine.Transform actor, UnityEngine.Transform conversant, Boolean allowLuaExceptions, PixelCrushers.DialogueSystem.IsDialogueEntryValidDelegate isDialogueEntryValid, Int32 initialDialogueEntryID, Boolean stopAtFirstValid, Boolean skipExecution) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Model/Logic/Model/ConversationModel.cs:127)
PixelCrushers.DialogueSystem.DialogueSystemController.ConversationHasValidEntry (System.String title, UnityEngine.Transform actor, UnityEngine.Transform conversant) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Manager/DialogueSystemController.cs:582)
PixelCrushers.DialogueSystem.DialogueManager.ConversationHasValidEntry (System.String title, UnityEngine.Transform actor, UnityEngine.Transform conversant) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Manager/DialogueManager.cs:328)
PixelCrushers.DialogueSystem.DialogueSystemTrigger.DoConversationAction (UnityEngine.Transform actor) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:821)
PixelCrushers.DialogueSystem.DialogueSystemTrigger.Fire (UnityEngine.Transform actor) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:611)
PixelCrushers.DialogueSystem.DialogueSystemTrigger.TryStart (UnityEngine.Transform actor, UnityEngine.Transform interactor) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:593)
PixelCrushers.DialogueSystem.DialogueSystemTrigger.TryStart (UnityEngine.Transform actor) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:579)
PixelCrushers.DialogueSystem.DialogueSystemTrigger.OnTriggerEnter (UnityEngine.Collider other) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:475)