App or APK updates and persistent data (Save Games, items, etc...)
What is a good way to handle persistent data against app (APK) updates that comes with different variables set (e.g. locked new items, levels, player skins)?
I wonder if it causes problems when the player loads the old saved data right after an application update, and the application demands a new set of data to feed game assets.
How to prevent the code from trying to access new variables wich its loaded contet is still not aware of existence?
Example:
save(1)
armor = 1.0f ;
life = 1.2f ;
Load(1)
player.armor = loadContent.armor;
player.life = loadContent.life;
App Update, player has new property "fly"
Load(2) from same old save 1 session.
player.armor=loadContent.armor;
player.life=loadContent.life;
player.fly=loadContent.fly (alert!)
(... but wait, loadContent.fly would return null or some unhelpful value like "0" until the next Save session).
How can we avoid this situation?
Your answer
![](https://koobas.hobune.stream/wayback/20220612152644im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Updating app in GP 0 Answers
Change Savedata without errors 0 Answers
AssetBundle dont saves in cash 0 Answers
Android PersistentDataPath UnauthorizedAccessException 0 Answers
List to XML 0 Answers