# Saving

{% hint style="warning" %}
This only edits the save data in memory. See [Writing Changes](/esave/scripting/saving-and-loading/data-management/writing-changes.md).
{% endhint %}

Each piece of data in a save file has an ID (string). This makes it possible to retrieve specific data by ID.

Saving data can be done with a single line with `SaveFile.AddOrUpdateData`.&#x20;

```csharp
saveFile.AddOrUpdateData("DataID", data);
```

The first parameter is the ID of the data, and the second parameter is the data itself. Any serializable data type can be saved. However,  most Unity types are not savable. ESave can save common Unity data types, including (but not limited to) `Vector2`, `Vector3`, `Quaternion`, `Color`, and `Transform`.

## Mutli-Add

Adding multiple data entries in a single call is only possible in the [Pro version](https://u3d.as/3vCT).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://espergames.gitbook.io/esave/scripting/saving-and-loading/data-management/saving.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
