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 KnightRiderGuy · Sep 11, 2018 at 10:19 PM · playerprefsarrayssavingstrings

Why is this not saving to player prefs and loading (Works in editor only)

I'm trying to save a string from an array into player prefs but for some reason it only wants to work in the editor. Help!!

This is my save method:

 PlayerPrefs.SetString("CharacterToRemb", CharsToRemember[0] = sresult);

This in my reload method:

 CharsToRemember[0] = PlayerPrefs.GetString("CharacterToRemb");

ONLY WORK IN THE EDITOR???

EDIT! So as it turns out the save and load method as near as I can tell are working OK but now this is the strange part that will REALLY BAKE YOUR BRAIN. I set up buttons to do the job of my VR inputs and strangely the buttons work but my VR inputs don't despite the fact that both input methods are calling and accessing the exact same public voids.

Why on earth this is the case is a real brain baker!!

Thoughts people, thoughts???!!!???

Lets see if any of you Braniacs have an answere for that little slice ;)

Comment
Add comment · Show 5
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 KnightRiderGuy · Sep 12, 2018 at 01:20 PM 0
Share

No one huh?? That figures :(

avatar image IvovdMarel · Sep 12, 2018 at 02:03 PM 1
Share

Based on the info it seems it has nothing to do with PlayerPrefs but ins$$anonymous$$d with your VR input. Is the function called more than once? Have you put breakpoints / prints in the code to see if it is definitely called?

avatar image KnightRiderGuy IvovdMarel · Sep 12, 2018 at 06:50 PM 0
Share

Thanks @Ivovd$$anonymous$$arel Well the VR inputs are definitely being called, I was able to figure out what the problem was, turn out on my VR calls it was set to look for a bool that was supposed to be false but I had it set in my if statement as true. But now that is working it lead me to an even stranger issue lol seems there is always something. Now what happens is if I use my VR inputs it reads the characters being called twice and sometimes multiple times even thought the character was read only once. No idea why that is happening but I guess that would be a whole new question to post about.... jeepers creepers :/

avatar image KnightRiderGuy KnightRiderGuy · Sep 12, 2018 at 07:51 PM 0
Share

Got it, just had to reboot the computer and now it's all working flawlessly :)

Show more comments

0 Replies

· Add your reply
  • Sort: 

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

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

How do I save and load a 2D array? 1 Answer

save string from array to player prefs 1 Answer

PlayerPrefs not saving mission info at all. 0 Answers

Using playerprefs to remember a level completion 1 Answer

Saving Data for a Multiplayer Game 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