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
0
Question by marcell123455 · Oct 25, 2017 at 08:32 PM · savingsave datasaveloadsave-to-filesave file

PlayerPrefs not saving in build

Hello Guys,

My problem is:

I am using PlayerPrefs for saving and loading. everything works as expected...in the editor... but when i make a pc build its not working.

i also tryd to call it while OnApplicationPause as told here: http://answers.unity3d.com/questions/1362755/playerprefs-not-saving-on-android-but-saving-in-un.html

but it also not worked... i am using unity 5.6.2f1 64bit

the code isn`t the problem, thats why im posting none.

Thank you so much!

Comment
Add comment · Show 1
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 jchester07 · Oct 26, 2017 at 03:34 AM 0
Share

Did you check the PC's registry when playerprefs are saved if those keys are recorded?

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Cuttlas-U · Oct 26, 2017 at 05:30 AM

hi; there should be no problem in saving player prefs; so there is some thing wrong in your scripts some where; i suggest u to install notpad++ and check all of your scripts to find if there is some where a code like : PlayerPrefs.DeleteAll();

Comment
Add comment · Show 5 · 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 marcell123455 · Oct 26, 2017 at 05:41 AM 0
Share

no i never used the deleting function.... but i was thinking, is it a problem for unity that i already have saved variables in my scene and that i than build it. does this make a difference?

avatar image Cuttlas-U marcell123455 · Oct 26, 2017 at 05:45 AM 1
Share

when u save a variable it will be saved on its machine; so when u build to android u have to save again the saves from pc wont be transformed to android;

avatar image marcell123455 · Oct 26, 2017 at 02:07 PM 0
Share

AHW ok! i tryd to say.

if var x = 1 you can save. normally var x was 0 and i edited in the inspector and saved so that he will load var x as 1 not as 0. because i couldnt use the saves from the editor in the build var x was always 0 in the build version which didn`t allowed me to save :D

avatar image Cuttlas-U marcell123455 · Oct 26, 2017 at 06:34 PM 0
Share

ok seems like u get it right ; tell me if u had any other problems with that ;

avatar image marcell123455 Cuttlas-U · Oct 27, 2017 at 12:19 PM 0
Share

no, everythings fine now. thanks ;)

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

74 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 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

saving array to bin file 0 Answers

How to load data from this serializable class? 1 Answer

Why does PlayerPrefs save to the Windows Registry? 0 Answers

Unity problem when i convert playerprefs save to the standard file io save 0 Answers

Problem with saving and loading game timer 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