Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Updating game deletes Unity's PlayerPrefs data in WebGL

A topic by Mang432 created Mar 27, 2021 Views: 1,523 Replies: 1
Viewing posts 1 to 2
(+1)

So, I noticed that if you update a WebGL build of an Unity game it will delete the PlayerPrefs data. I noticed this after launching a bug fix update for a game. I think this problem is related to itch.io rather than Unity because I tried to upload the exact same file and the bug occured.

After looking for a while I found this post https://itch.io/t/256232/game-data-lost-after-update that says about this same problem, the reason why it occurs, and a possible solution of letting "the user save and load via ordinary files". I don't think that's a good solution since it just ruins the convenience of playing a game in the browser. Also, not transitioning to a different save method is preferable because I don't want to just throw away the player data that's already stored.

Anyone got any alternate solution?

(+1)

I'd like to know too... I tried to use Pastebin's API (weird I know but I just need to save texts and it works for my purposes) but it was needlessly complicated and didn't manage to get it working. Even though Pastebin says that you can do it without the API you can't really because of some CORS issue.

I read somewhere that if you use itch.io's Butler when updating in some way you could keep it but I don't know much about it. Most of the info I found was from 3 years ago, was hoping that was not still an issue :/

This topic has been auto-archived and can no longer be posted in because there haven't been any posts in a while.