Added type saves wrong
Posted: Fri Jan 07, 2022 11:01 am
Hello. I've added manually through editor a type to be saved and loaded. It contains primitive types - but it saves null without errors in logs.
https://imgur.com/a/kNRExKq
Code: Select all
public void SaveData()
{
ES3.Save("Society", society);
Debug.Log("society==null " + society == null); // "False"
// Test
society.population = 0;
Society societyTest = ES3.Load("Society", society);
Debug.Log("society1==null " + societyTest == null); //"False"
Debug.Log("pop: " + societyTest.population); //NullReferenceException
}
https://imgur.com/a/kNRExKq