Skip to main content

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

Losing PlayerPrefs between Uploads

A topic by Thejaspel created Mar 09, 2022 Views: 188 Replies: 1
Viewing posts 1 to 3

Hello all! 

I am working on a WebGL Unity game. Every time the game is updated (through the web or through Butler) all save data is erased. I have even found this to be true when using Butler and specifying the same version number for the new version of the game and when uploading the exact same file. However, Unity says that PlayerPrefs should be saved between builds. Is it possible that Unity is losing the reference to the old save data because it changes the name of the file each time a new file is uploaded? If so, is there a way to adjust or disable this setting?


Thank you!

Admin

Due to how we distribute HTML games on our CDN. The path of the game is unique per upload and build. This means you need to take that into account when using local storage with your save games. By default I believe Unity uses a prefix with the path, so each new version you deploy will have a different save game location in local storage.

Hope that helps

Admin moved this topic to Questions & Support
This topic has been auto-archived and can no longer be posted in because there haven't been any posts in a while.