# Runtime Save Creation

## Important Information

Before we begin, it's important to note that `new SaveFile()` is not always creating a new save file in the users system. It will only create a new save file if there isn't a save file in the specified path with the specified file name.

For example, if we use the same SaveFileSetupData for 2 SaveFile instances, only 1 file will be created in the user's system. The 2 SaveFile instances will simply be editing the same file.

```csharp
SaveFileSetupData saveFileSetupData = new SaveFileSetupData()
{
    fileName = "Save File",
    saveLocation = SaveLocation.PersistentDataPath,
    filePath = "Example/Path",
    encryptionMethod = EncryptionMethod.None,
    addToStorage = true
};

// Both of these will be editing the same save file
SaveFile saveFile1 = new SaveFile(saveFileSetupData);
SaveFile saveFile2 = new SaveFile(saveFileSetupData);
```

This is here for informational purposes only, and <mark style="color:yellow;">**it is not**</mark> recommended to do.


---

# 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/runtime-save-creation.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.
