I am trying to save a struct with child members, and it's not working. This doc page (https://docs.moodkie.com/easy-save-3/es ... ted-types/) says that struct saving is automatic. Here is my code
Code: Select all
public class TestScript
{
[System.Serializable]
private struct Data
{
[SerializeField]
private int m_Int;
[SerializeField]
private float m_Float;
public int m_Int2;
public float m_Float2;
}
[SerializeField]
private Data m_Data;
private ES3Settings m_Settings;
private void Save()
{
ES3.Save<Data>("m_Data", this.m_Data, this.m_Settings);
}
private void Load()
{
this.m_Data = ES3.Load<Data>("m_Data", this.m_Settings);
}
private void Awake()
{
this.m_Settings = new ES3Settings();
this.m_Settings.saveChildren = true;
}
}
{"m_Data":{"__type":"TestScript+Data,Assembly-CSharp","value":{}}}
You can see that none of the members are saving. Any help would be appreciated.
Thank you
Les