Games can store data, such as the player progress. See this guide for detailed explanations and examples.

Storage actions will store all the data into internal storage (persisted after the game is closed). If you want to write or read from files, read the page about File system (only for Windows, macOS, Linux).

Clear the storage during a preview

Data is stored permanently in the internal storage of the preview window, which is persisted across previews and even after GDevelop is closed (like in an exported game).

When we preview our game it can be sometimes useful to have the data reset, like if it's the first time the game is launched. To do this, you can clear the storage:

  • In the top bar of the preview window select ViewToggle developer tools.
  • The developer tools usually open with the 'Console' tab selected displaying some messages.
  • Click the 'Application' tab. It may be not visible depends on the size of your preview window. You can resize the preview window until you can see the 'Application' tab on the top.
  • After you have selected the 'Application' tab, you can find the stored data on the left-hand side under StorageLocal Storagefile:
  • If you click the 'file:' with the left mouse button, you can see more detail about what data is stored in the storage.
  • To clear the data, click 'file:' with the right mouse button and choose 'Clear'

You can now close the preview window. When running the preview again, the stored data will be gone.