Am i missing something obvious here?
Here are my Save / Load methods. Load() is being called on Start() and Save() is on OnApplicationQuit().
Code: Select all
public void Save()
{
List<int> ids = new List<int>();
for (int i = 0; i < items.Count; i++)
{
ids.Add(items[i].id);
}
ES3.Save<List<int>>("Inventory", ids);
}
Code: Select all
public void Load()
{
List<int> ids = new List<int>();
if (ES3.FileExists())
{
if (ES3.KeyExists("Inventory"))
{
ES3.LoadInto<List<int>>("Inventory", ids);
}
}
}
Code: Select all
{"Inventory":{"__type":"System.Collections.Generic.List`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]],mscorlib","value":[0,2,1]}}