I am using a save game object and I noticed that after I modify my project some the save game object becomes corrupted or something. I was using it for some configurations on my character and after a few changes the Save game object no longer works and my character reverts to its default state. The only fix I’ve been able to find is just deleting the old sav file and letting my game create a new one. Is there a way to tell prevent this from happening? I have the data also saved to an external database so that I’m not losing the data but, I wanted to reduce the number of calls to it so I was trying to piggyback off of the save game object. It seems that after a few iterations the game can no longer read the save game object.
With blueprint is kind of hard to control this, but to avoid corruption avoid reordering, renaming and removing properties in middle (you can left then unused, remove them you ready to kill save files), always stack new properties on top, so serialization structure is unchanged and new things are added at the end of the file. In C++ this is easier as declared stricture is stored as you declare for sure you also have option directly controlled how save game object is serialized as class structure you declare should be structure of what is serialized and it should have same order, blueprint system don’t guaranty that.
Sadly there no version stored, i think best option to try would have version variable on your own as a first variable and hope that it wont get corrupted and read it first before anything else, use integer type for version as value are stored in bytes as they are.
Other option is to use different savegameobject class for each version and keep them for backward compatibility and do updates if loaded save file is specific class