ESave
ESave Pro
ESave Pro
  • ESave Pro Documentation
  • Pro Comparison
  • đŸ•šī¸Getting Started
    • Installation
    • Demo
  • ESave Settings
  • 🧩Components
    • ESave Initializer
  • 📄Scripting
    • Initialization
    • Save Operation
    • Save States
      • Infinite Saves
        • Infinite Save Scripting
    • Saving & Loading Data
      • Saving
      • Loading
      • Custom Serializable Objects
      • Example Script
    • Data Deletion
  • đŸ› ī¸Support
    • Getting Help
  • 📚Changelogs
    • Latest Releases
  • ⭐Rate Me?
Powered by GitBook
On this page
  • Deleting From Save States
  • Delete Specific Data
  • Delete All Data
  • Deleting Save States
  • Deleting a Save State
  • Deleting All Save States
  1. Scripting

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).

PreviousExample ScriptNextGetting Help

Last updated 1 month ago

📄