1

I am working with an existing codebase, and we have been developing some changes to our Unity game. It is already live on the App Store and Play Store with a number of users. The new changes add some onboarding and database changes, along with some frontend UI stuff.

The player's data is currently stored with PlayerPrefs, and now also on the Firebase database. I'm trying to figure out a way of testing if the new release will wipe the user's data (the data stored in PlayerPrefs).

I ask because when installing test versions of the app manually, the user is asked to delete their existing version of the game (including all data). I assume this is not the case when a user simply updates to a new version of the app, but I can't find any docs on the actual workings of this.

The closest clue I have found is this post , but I'm not confident enough to release the app just based on these assumptions yet.

If someone could point me to some resources on how App updates work on the Apple / Play stores, that would be greatly appreciated!

3 Answers3

0

Your player's never lose own data when update your app in Apple & Android. If you are save the data like PlayerPrefs way.

bmoglu
  • 59
  • 6
0

The data on their mobile phone (saved with player prefs) won't be automatically lost, but your application will still try to access the old data that was saved by previous versions, so be wary of Backwards Compatibility.

If you save stuff on a previous version, using a player pref field like "gameData" and then update your app and it tries to read it like "game_data", it may cause unexpected behaviour.

Rafael Kuhn
  • 67
  • 1
  • 3
0

First of all, you won't lose data on a device except they reinstall the entire game. (on Android/IOS. I am not sure about behavior on other platforms)

But you should be careful, if you modify the usage of your data on the device like changing the data structure of your JSON string or renaming a PlayerPref key, your application might crash if old data on the device is not compatible with your new data.

You should update the data on the device if you have changes on them in your updated version.

You can do that data update at the beginning on your new updated version and turn some bool to true like "UpdateV1.1 Migration" or however you like.

Also, you can test your application version update with your version control system.

Tag your version build commits on the version control and when you complete programming your latest update, turn back to the last build commit on the version control and play your game like a normal player. After that when you return your latest commit and hit play your game will behave almost like a newly updated game on a device.

Sorry for my English if I made a mistake, I am constantly trying to improve it.