Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Unity WebGL won't save the files unless player quits the game

A topic by suicidal_blob created Apr 30, 2023 Views: 279
Viewing posts 1 to 1
(2 edits)

At the moment I'm working on a game in unity 2019 and I want it to be played in the web browser. 

To save the game I used a static folder like "/idbfs/[game name]" and not Application.persistentDataPath so that the game save data will persists after updates. Also I'm using butler to update my game.

This does help in persisting the files but only if I quit the game using Application.Quit() method in unity.

While playing, the files are created and can be accessed but if I refresh the page without quitting the game, the files are deleted.

On Android and Windows I don't have this problem, only on WebGL. 

I have no idea why this is happening and I can't find anyone with the same problem

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