- Home /
How to fix lost data with android
I've received a lot of feedback from android users that they lost the player data suddenly and started game from initial...This issue tend to happen at update via google play market. I guess this issue came after I imported some plugins and changed android manifest to add permissions.
Android OS : happen with 4.2, 5.0, 6.0 Unity : 5.5.0p4 Way to store data : Playerprefs with http://previewlabs.com/writing-playerprefs-fast/ Permission in Manifest for Plugin :
Is there someone who faced same issue? Please share your solution or hint with me.
Wait, don't tell me you actually saved game data through playerprefs? I think that once you lose it, IF the player prefs are intact you will need to rollback the update and find a way to update permissions without changing them.
But honestly, first you probably need to stop saving game data through playerprefs.
thank you for your feedback. It seems I misunderstood playerpref is unity recommended style... so do you mean once I change the permission, user data must be erased?
Answer by $$anonymous$$ · Aug 27, 2017 at 04:46 AM
You should try Script Serialization https://docs.unity3d.com/Manual/script-Serialization.html and https://unity3d.com/learn/tutorials/topics/scripting/serialization-and-game-data
This is probably the most popular way of dependably saving data.