Hello All,

I recently ran into an issue while implementing Game Saves in my project.

I have the Player's prefab set up with 3 int variables for some rudimentary stats. Initially the variables were set to local. During testing I was noticing that any changes in the 3 int variables did not save.

Reading about save games in Makinom I saw that local variables do not save. I disabled the local variable option on the Player-prefab's Object Variables Component. Afterward changes in the Int Variables did save upon game load.

I found when I don't have the player's stats the exact same, I cannot load the previous game state. If I start a new game I cannot reload my previous saves without getting the following error.

I know I am doing something wrong with the variables which is causing this.
_______________________________________________________________________________________
ArgumentException: An element with the same key already exists in the dictionary.
System.Collections.Generic.Dictionary`2[System.String,Makinom.VariableHandler].Add (System.String key, Makinom.VariableHandler value) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:404)
Makinom.GameHandler.LoadGame (Makinom.DataObject data)
Makinom.SaveGameHandler.SetLoadData (Makinom.DataObject data)
Makinom.SaveGameHandler.Load (Int32 index)
Makinom.LoadGameChoice.ShowQuestion ()
Makinom.LoadGameChoice.ChoiceSelected (Int32 index, Makinom.GUIBox origin)
Makinom.DialogueContent.OkPressed ()
Makinom.DialogueContent.ShowWindow ()
Makinom.GUIBox.ShowGUI ()
Makinom.GUIHandler.ShowLayer (Int32 layer)
Makinom.GUIHandler.ShowGUI ()
Makinom.MakiCore.FireGUITick ()
Makinom.MakinomHandler.OnGUI ()
_______________________________________________________________________________________
  • That seems like a bug, will fix it in the next update.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.