Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by spartan029 · Oct 25, 2015 at 08:49 PM · androidiosiphoneplayerprefsunity 4.6

Playerprefs being cleared on some devices when the phone is restarted...why!?

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!

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Statement · Oct 25, 2015 at 08:56 PM 0
Share

Try calling PlayerPrefs.Save after you've made changes to the prefs. Or is this what you mean when you say "Tutorial completion is saved"?

avatar image spartan029 Statement · Oct 25, 2015 at 08:59 PM 0
Share

That's what I mean with the bold :D Game works and saves great on ~95% of installs....but this handful of special cases is totally bugging me haha :P

avatar image ZenithGames · Mar 13, 2019 at 11:11 AM 0
Share

Any news here? Still bugged in Unity 2018.2,Any news guys? Same situation here. 10% of the devices are going crazy. I thought it's older devices only, but today I got Samsung Galaxy S9 today.

@Guillaumzed @spartan029 @aresundnes

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by aresundnes · Oct 29, 2016 at 06:03 PM

Did you ever figure this out? Seem to have a similar issue...

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Guillaumzed · Feb 01, 2017 at 11:14 AM 0
Share

Did you get it, since then ? Similar issue here, it's getting me mad because I can't test it. It occurs on some of my player's phones. I'm thinking maybe some other app is clearing the cache of all the apps on these phones ?

avatar image
0

Answer by Guillaumzed · Feb 01, 2017 at 10:22 AM

Same question here. 5% on people on android are telling me the game doesn't save on their phones ! Anybody has found a solution ?

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

44 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Device Rotation in Landscape mode. . . 0 Answers

Can we make game in Unity with Swift and Objective C or Do I need to learn another language for making games? 2 Answers

Unity3d files convert to base64 encode 0 Answers

Memory Issues while App Launching,Memory Spike right before Splash Screen(Cold Start?) 0 Answers

How to Get to another app 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges