So I have a simple game on Android and iOS that makes use of the playerprefs feature of Unity.
The problem, which I've not been able to reproduce on my own devices but have seen first hand on a friend's iphone5 is that **when the phone is restarted (either manually, or battery died and was turned on after a charge) all the save data in the playerprefs is just gone!**
It seems more prevalent on Android devices based on app reviews. I've tried reaching out to those affected but haven't been able to get much help from them.
I know it's a long shot...but wanted to see if anyone here has come across this weird behavior.
**More details:**
- playerprefs is manually cleared in only 1 place in the entire codebase. It is triggered when the game is started if after looking at playerprefs...it is determined that the player hasn't completed the short tutorial. Tutorial completion is **saved** in playerprefs immediately upon completion of the tutorial.
- Confirmed visually happening on iphone5. Reported happening on Samsung Galaxy S3, Samsung Galaxy Tab4 10.1. Doesn't seem to happen on all Galaxy S3 though.
- [UPDATE] The game works and saves perfectly as intended on ~95% of installs. This is a special/weird/edge case we're discussing :)
**TLDR:**
On some phones, very rarely... when the phone is restarted...playerpref data is completely erased somehow.
Thanks in advance for any help! Much appreciated!
↧