Whenever I add data to my save file, all my users with older save files lose their save games. I know this has been answered, but I can't seem to find it. I track my version as my first field, but how & where do I add code to check version before reading data? Can I edit the ES2UserType_XXX.cs files, or will those be overwritten every time I add more data to my custom save objects?
If you manually modify the ES3Type, any changes in Manage Types will overwrite them. So you will need to type your new Read and Write calls directly into the ES3Type file instead.
Note that incase you were not already aware, Easy Save 3 automatically handles this.
I should upgrade then I think, but what does ES3 specifically handle automatically? I'm reading the guide at https://docs.moodkie.com/easy-save-3/es ... -es3types/, and it sounds like if I make changes to the ES3TYPE file, my changes will get overwritten in ES3 too when you update your type.
Does that mean it no longer just saves the data sequentially? Historically, my save would break when, for example:
+ The user has a save game, version 1.0, with strength, intelligence and dexterity.
+ I add wisdom as a saved stat and push version 1.1 of my game
+ The user downloads version 1.1. When he runs version 1.1, the LoadGame() function tries to read 4 data fields (now with Wisdom included), but the save file only has 3 fields, so it hits End of File.
How does the new version know how many fields will be present? Does it store the data structure and field names along with the save instead of just the data?