Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
gdevelop5:all-features:storage [2019/01/24 18:57]
4ian
gdevelop5:all-features:storage [2019/07/17 21:32] (current)
4ian
Line 3: Line 3:
 Games can store data, such as the player progress. See [[gdevelop5:​tutorials:​storage-action-explained|this guide]] for detailed explanations and examples. Games can store data, such as the player progress. See [[gdevelop5:​tutorials:​storage-action-explained|this guide]] for detailed explanations and examples.
  
-<​note>​Storage actions will store all the data into **internal storage**. If you want to write or read from files, read [[gdevelop5:​all-features:​filesystem|the page about File system]] (only for Windows, macOS, Linux).</​note>​+<​note>​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 [[gdevelop5:​all-features:​filesystem|the page about File system]] (only for Windows, macOS, Linux).</​note>​ 
 + 
 +## 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 **View** -> **Toggle 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 **Storage** -> **Local Storage** -> **file:** 
 +  - 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.