I'm building a mobile game for a client in Unity. To save time, we started with a template game from the Asset Store that had some of the features that the client wants.
The game includes a progression system and shop, so we save the user's scores, progress, in-game currency, inventory, etc. We currently have no plans to export the save data.
The template game uses PlayerPrefs to store all save data. Is this bad practice? Assuming we don't include a button that calls PlayerPrefs.DeleteAll()
, is there any extra risk associated with using PlayerPrefs instead of external files to store the player's data?
Answer
It is up to you, but on android at least it is very easy to reset these things on your phone. Most of the time it is best to save things that you do not want to lose externally so that the user cannot manipulate or delete it. I am not positive how easy it is to do on iOS, but on android all you have to do is go to the app in the application manager and clear the cache and it will remove all of those PlayerPrefs.
Overally it would not be a good option for things you need to hold on to. Especially things like in game currency as users can find ways to manipulate this data.
No comments:
Post a Comment