Quantcast
Channel: Questions in topic: "webgl"
Viewing all articles
Browse latest Browse all 2390

How do I get PlayerPrefs to save in WebGL build when hosted?

$
0
0
Hi! I'm using Unity 5.4.0b17, and I can't get PlayerPrefs to save when hosted. It works locally, but from my webserver, it doesn't. m_savedData.SetDefaults(); base64EncodedSettings = GetBase64EncodedSettings(); PlayerPrefs.SetString(m_settingsKey, base64EncodedSettings); PlayerPrefs.Save(); GetBase64EncodedSettings returns a string generated by encoding m_savedData. I don't see any errors in the webconsole. Here's a link to the program in question: http://www.maniac-games.com/Prototype/Cognizer-Free/ To test the save, the easiest thing to do is go to Options, and adjust the sound volume, then restart the game. You'll see the setting is not saved.

Viewing all articles
Browse latest Browse all 2390

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>