I've looked over a few resources and posts for an answer, including the performance guide, but I think I've reached my breaking point and decided to ask here on the forums for help since I needed this working as soon as I am able to get it to.
To make the explanation simple:
I have several save slots to load from and create a save file for them via cache like so:
Code: Select all
public ES3Settings saves;
OnGameStartup(){
saves = new ES3Settings(ES3.Location.Cache);
}
Save(){
saveName = name + number;
ES3.Save<List<CustomClass>>("sceneIndex", CustomClassReference, saveName, saves);
ES3.StoreCachedFile(saveName, saves);
}
Code: Select all
Load(){
saveName = name + number;
ES3.CacheFile(saveName, saves);
ES3.LoadInto<List<CustomClass>>("sceneIndex", saveName, CustomClassReference, saves);
}
Typically, this works totally fine and the data is loaded and applied without issue. However, if I stop runtime and then attempt to load from the stored cache file after starting a new runtime session, said custom class will no longer be loaded properly and will result in a null/empty reference in my scene. I feel like I am misunderstanding how to properly utilize the stored cache file as I am using it for the faster save/load times.
Since it works if I save and then load within the same session, I imagine I might be screwing up somewhere without realizing it!
Any help would be appreciated, as this was a last minute bug I realized pretty late! Thank you very much for any response!