We released our game on several platforms, including WebGL. This game saves some local stuff (app language, local users…) into the PlayerPrefs, using the browser’s IndexedDB API.
Though we noticed after uploading a new version of the app on our server, the data in the PlayerPrefs is gone.
Is there any way of keeping these data, after a new upload of the game?
I’ve read taht WebGL can’t write to disk, so reading/saving a file on disk isn’t possible.
Some topics about this problem mention the use of cookies, but couldn’t find any decent documentation on how to use this.
Is there a decent solution to fix this?
Kind regards,
Carsten
Honestly, playerPrefs is a little unreliable on webgl as there are some rules to it, since you’re counting on a users browser to support it and not have stuff blocked or even your game host to not do something weird. We dropped them on webgl and just use our backend server to store that info.
Unfortunately, this is true with many of the same options on the web (I did some research into this a while back).
Wish I could give you better info, but, like I mentioned, when we first started webgl, we found it just wasn’t giving us consistent results. (and sounds like you might have found another issue). It’s possible it has improved since we dropped it, though.