How to clear the cashed local storage data after re-install?

Hi,

The case is as follows:

  1. The game is installed in Windows
  2. The game stores and loads data with storage events
  3. The game is uninstalled

After that when a new (second) installation is done, the game reads the storage data from the first installation.

The context is that highest score is saved and loaded with storage events. But if there is previous installation and re-installation after that, the highest score at the very beginning / at the very first play of the new (second) install reads the data from the first installation (the uninstalled one).

How to fix that in order to have clear cashed local storage data after re-install of Windows game?

Best regards,

Is recommendable to add a button in game to delete data like I do here in my game, then you can control with some global variable which kind of installation is.

I mean when the game runs for the very first time the installation_variable = 0, so you store in LocalStorage installation_var = 1.

Then in the future always check installation_var if is 0/1
Then do stuff…

1 Like

the data of the game should be stored somewhere in users folder in your file explorer on windows.
Maybe in local or appdata. If you have a shortcut of the game open the properties you can see the path.

How to check with event script whether the game runs for the very first time?

You could try something like this:
In you project add the global variable first_play = 0

This event happens in the main menu of the game so always check if Storare name exist and first_play is 0, otherwise data already exists.

Thank you very much!

It is good work around. However I guess a proper uninstall is needed (as a real solution).