Runtime Save Deletion
Deleting saves with code.
Last updated
Deleting saves with code.
Last updated
Deleting saved data can be a dangerous task, as it results in the player losing their progress. Make sure saves are being deleted only when necessary (usually only when the player manually deletes them).
As long as you have a reference to a SaveFile
, you can freely delete any data.
Use the method below to completely remove a save file from the user's system.
Deleting all saves is easier in .
Deleting all save files will require you to have a reference to all of them. Using the save storage is one way of getting save files, but only the ones with addToStorage
set to true will be available in the save storage.
Alternatively, you have the option of completely removing all data while keeping the file in the user's system.