Change Savedata without errors
Hello there fellas.
So here is my setup. I use BinaryFormatters to save my data. For example I would have a class like this:
[Serializable]
public class SaveData
{
float saveFloat;
}
I can save and load this just fine. Now imagine I update my game and now my class looks like this:
[Serializable]
public class SaveData
{
float saveFloat;
myClass saveClass;
}
Now if I load an "old" file it will throw an error because it doesnt contain saveClass.
The same is true if I removed saveFloat. My files still contain it but my loader doesnt know what to do with it.
So the question is: How do I make my savesystem update-proof?
Thanks in advance friends :D
Your answer
Follow this Question
Related Questions
problem with loading data with serialization in the right time 0 Answers
Save and Load Problem, Dont quite understand. 1 Answer
How to add a new data to existing Binary file without erase the previous data? 0 Answers
Save and load player position in main scene 1 Answer
Binary formatter for saving sound settings (Slider doesn't remember fill area) 0 Answers