Hi,
I just grabbed Easy Save on the asset store, I've had success with saving and loading floats and ints, but am having trouble with loading bools.
I used Debug.Log("Persistent Path" + Application.persistentDataPath); to locate the .es3 file, upon opening it and reading it, I can verify that the bool is saving to the correct value upon using ES3.Save<bool>("MyBool", MyBool); in the OnApplicationQuit() method.
But, when I use: ES3.Load<bool>("MyBool", MyBool); in the start function, it isn't overriding the value of the bool in the script. I've tested it every which way, and it seems that ES3.Load<bool>("MyBool", MyBool); just doesn't seem to be working for me.
Trouble loading bool
Re: Trouble loading bool
Hi there,
You need to assign the return value of the ES3.Load method back to your variable. I.e.
All the best,
Joel
You need to assign the return value of the ES3.Load method back to your variable. I.e.
MyBool = ES3.Load<bool>("MyBool");Note that the second parameter of the ES3.Load method is the default value returned if no data was found to load from.
All the best,
Joel