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 /
avatar image
6
Question by Katsura · Jul 20, 2011 at 10:18 AM · playerprefs

PlayerPrefs saving

Hello, everyone! I use some PlayerPrefs in my unity app (platforms are: iOS, Android, Windows). Now I want to release update, so it's a question: when users update there apps - will PlayerPrefs be saved? The problem is that I store the game progress in this prefs and if users will lose it after update - it will be very bad. Is there reliable information about this question? Thanks.

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
2

Answer by BerggreenDK · Jul 20, 2011 at 10:45 AM

I would, if in your situation, build 2 small test apps. Then try to save something in playerprefs from testapp1, and then see if I can read it from testapp2.

If I can read the playerprefs from another app, my guess would be that playerprefs is bound to the device/player and not the app.

Second test would be to try to update testapp1 and then read the first information again, to validate that an update does not hurt data belonging to a certain app.

I havent tried this, but this is how I would proceed without any docs telling me how Playerprefs are implemented on smartdevices.

Update

http://unity3d.com/support/documentation/ScriptReference/PlayerPrefs.html

On Mac OS X

PlayerPrefs are stored in ~/Library/Preferences folder, in a file named unity.[company name].[product name].plist, where company and product names are the names set up in Project Settings. The same .plist file is used for both Projects run in the Editor and standalone players.
On Windows standalone players, PlayerPrefs are stored in the registry under HKCU\Software[company name][product name] key, where company and product names are the names set up in Project Settings.
On Web players, PlayerPrefs are stored in binary files under ~/Library/Preferences/Unity/WebPlayerPrefs on Mac OS X and %APPDATA%\Unity\WebPlayerPrefs on Windows. There is one preference file per Web player URL and the file size is limited to 1 megabyte. If this limit would be exceeded, SetInt, SetFloat and SetString will not store the value and throw a PlayerPrefsException.
But this doesnt say ANYTHING regarding smartdevices. Hmmm... ! My guess from this sentence: "There is one preference file per Web player URL and the file size is limited to 1 megabyte." is that its bound to the app, but just as I can change the unity3D file of a website, so should the App be able to change/update without destroying the Prefs. Thats my bet.
Comment
Add comment · Show 4 · 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 Katsura · Jul 20, 2011 at 10:49 AM 0
Share

Thanks. Yes, I'll do tests anyway (it'll take much time if I want to simulate the real case), so now I'm just looking for other people who have expierence in this question.

avatar image BerggreenDK · Jul 20, 2011 at 10:51 AM 0
Share

but now you've gotten me curious!

avatar image BerggreenDK · Jul 24, 2011 at 02:07 PM 0
Share

had any time to find the result yet?

avatar image Katsura · Jul 24, 2011 at 02:16 PM 0
Share

Yep, I checked Android and Windows: all PlayerPrefs are saved after app upgrade. I have not any iOS device for tests right now, but I guess it works well too.

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Audio not playing on TriggerEnter (Pic Included) 3 Answers

UI Slider, Save Values and Change Them 0 Answers

playerprefs and UI. 3 Answers

keep adding to playerprefs 1 Answer

PlayerPrefs isn't saving between Scenes 1 Answer


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