Page 1 of 1

Need help - Dictionary<string, List<PlayerStatsPlus>>

Posted: Wed Nov 17, 2021 8:47 pm
by rodrigoMorales
I purchased the Save solution to migrate from my old Bayat free (Unity) solution to a more complete one. However in my current project I have a class that contains my variables among them a string list dictionary, and when I send Es3.Save, it doesn't save the list information in the dictionary, it saves all of them as null.
Example:
public Dictionary<string, List<PlayerStatsPlus>> playerHolder = new Dictionary<string, List<PlayerStatsPlus>>();
Bayat save updates the information correctly, but ES3 leaves all playerHold entries null.

//playerHold is one class that contais a lot variables, is my char status of one RPG project.

Someone know how to solve this save problem?

Re: Need help - Dictionary<string, List<PlayerStatsPlus>>

Posted: Wed Nov 17, 2021 9:34 pm
by Joel
Hi there,

I have responded to your email. Just to reiterate the message I sent you:
Unfortunately it’s not possible for me to replicate this from what you’ve said. Please could you replicate this in a new project with a simple scene and send it to me with instructions?

Also be aware that unlike other solutions, Easy Save serializes fields of UnityEngine.Object reference types (such as Components/MonoBehaviours/GameObjects/ScriptableObjects) by reference, not by value. This means that if your object is generated at runtime, you should save and load it separately so that a reference exists before you try to load that reference.
All the best,
Joel