- Home /
Does PersistentDataPath get overwritten on mobile?
So I'm wondering if I have an update for a mobile game does the PersistentDataPath get overwritten?
I have character save data in the directory and I do not want it to be overwritten with each update.
Answer by kromenak · Feb 27, 2013 at 08:16 AM
PersistentDataPath won't be overwritten; if you update the app on the device, any data you store at that location will still be available for you to use in the update. This is exactly the way you'd want to save character data or player progress.
There are some Android issues to be wary of. If your Android manifest has the WRITE_EXTERNAL_STORAGE permission, then the PersistentDataPath will point to a location on the SD card instead of internal storage, which can cause huge bugs with lost data if the data location changes between updates. Frankly, I think its rather dumb that the location would change based on a permission, but that's what it does.
Also, if you store data on the SD card, Android 2.2 will erase it on update - a bug in that version of Android. Not too big of a deal, since 2.2 is getting old...all in all, I'd suggest storing data on internal storage unless you need to share it between applications or something.
I'm doing just internal storage so that works fine. Thank you so much!
Your answer
Follow this Question
Related Questions
Updating my game on Play Store or App Store 0 Answers
How to display a video behind gui on mobile 2 Answers
DOs and DON'Ts in mobile game development 2 Answers
Application.genuine 0 Answers