Data Deletion

How to delete saved data.

Deleting saved data can be a dangerous task, as it may result in the player losing their progress. Make sure saves are being deleted only when necessary (usually only when the player manually deletes them).

Deleting From Save States

You can delete data from save states if you have a SaveState reference.

Delete Specific Data

Use the DeleteData method to delete saved data with a specific ID.

saveState.DeleteData("MyDataID");

This method returns a Save Operation (result type: bool).

Delete All Data

The DeleteAllData method deletes all saved data, completely emptying a save state. This does not remove the save state itself.

saveState.DeleteAllData();

This method returns a Save Operation (result type: bool).

Deleting Save States

The ESave class is what manages save states, so that's what you can use to delete saves.

Deleting a Save State

The DeleteSave method completely removes a save state. It accepts an ID (int) or SaveState parameter.

ESave.DeleteSave(mySaveState);

This method returns a Save Operation (result type: bool).

Deleting All Save States

Use the DeleteAllSaves method to completely remove all save states.

ESave.DeleteAllSaves();

This method returns a Save Operation (result type: bool).

Last updated