# Initialization

{% hint style="success" %}
Remember to use the `Esper.ESave` namespace when scripting.
{% endhint %}

## Initialize

Initialization is required for ESave to work properly. The `Initialize` method does a lot of things—the most important one being establishing the database connection.

```csharp
ESave.Initialize();
```

This method returns true if ESave was successfully initialized. False is returned otherwise.

You can check if ESave is already initialized with `ESave.IsInitialized`.

## Terminate

The `Terminate` method disconnects from the database. It's recommended to use this method when the application or play mode is exited.

```csharp
ESave.Terminate();
```

This method returns true if the database connection was successfully terminated. False is returned otherwise.


---

# 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/scripting/initialization.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.
