# Demo

The demo scene simply uses Unity's starter assets with the functionality of saving and loading some data. This section does not include the infinite saves example scene. For the infinite saves example rundown, see [Infinite Saves](/esave/esave-pro/scripting/save-states/infinite-saves.md).

## Setup

{% hint style="warning" %}
You may need to open the [Settings](/esave/esave-pro/editors/settings.md) window at least once.
{% endhint %}

If you'd like to try the demo scene, follow these steps:

1. Navigate to `Assets/StylishEsper/ESave/Examples`.
2. Double click `Demo.unitypackage` and click `Import`.
3. Open the `Demo` folder and double click the `Demo` scene.
4. Enter play mode.

## What to Know

{% hint style="info" %}
If you'd like to go straight into how saving and loading is scripted for the demo scene, open the `SaveLoadExample.cs` script which can be found in `Assets/StylishEsper/ESave/Examples/Demo/Scripts`.
{% endhint %}

The 4 buttons at the bottom-right are the only things that are relevant to ESave. You can use those buttons to perform saving and loading action.

There are only 2 things that are saved and loaded:

1. The player character position.
2. Some hard-coded text.

There are 4 buttons at the bottom-right of the screen. Each button will do something different.&#x20;

### Create Save

The Create Save button simply creates a save state if one does not exist. If a save state exists, nothing will happen.

### Load

The Load button loads the save state if it exists. It performs a check to see if the position and text data exist. If so, the player character position will be set to the loaded value and the loaded text will be displayed in the console.

This will also set the save as active, as the active save is simply the last one that was loaded. Learn more about active save states [here](/esave/esave-pro/scripting/save-states.md).

### Save

The Save button saves the player's position in the save state and saves the hard-coded text in player settings. Player settings is essentially used to save and load data that should be available no matter which save state is loaded.

### Delete Save

This deletes the created save state. Since the text is saved in player settings, it is not affected. This also unloads the active save state.


---

# 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/esave-pro/getting-started/demo.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.
