I'm using PlayerPrefs to store the players' highscore on each level, but in the next version I'll change how scoring works.
- For example, In the old version players could easily reach 250 points on a specific level, while in the new version it's difficult to reach even 50.
I would like to delete PlayerPrefs data which were saved during earlier versions, because scores that high would cause some issues in the newer version.
What is the best way to safely maintain compatibility of saved data between versions, but also be able to reset them if a new update requires it?
My current solution is that from now on I use new keys to store the data, for example by adding the current version to it.
- For example, in version 2.0 the data that was originally saved with the key "score-Level8" would now be saved with "score-Level8-2.0".
This way the player's progression gets "reset" after an update, but the old saves remain until another game changer update comes, and I have to increase the version part of the key from 2.0 to 3.0.
This feels a bit error-prone and unprofessional.