> For the complete documentation index, see [llms.txt](https://mindcodeinteractive.gitbook.io/easy-build-system-old/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mindcodeinteractive.gitbook.io/easy-build-system-old/components/building-manager/building-saver.md).

# Building Saver

Save and load the position, rotation, and scale of all [Building Parts](/easy-build-system-old/components/building-part.md) in a scene.

{% hint style="warning" %}
Saving may take longer depending of platforms and the number of [Building Parts](/easy-build-system-old/components/building-part.md) to save.
{% endhint %}

The save path is automatically defined by the name of the scene and the platform target.

* **Standalone** Save path relative to [Application.persistentDataPath](https://docs.unity3d.com/ScriptReference/Application-persistentDataPath.html).
* **Mobiles** Save path relative to [PlayerPrefs](https://docs.unity3d.com/ScriptReference/PlayerPrefs.html).

{% hint style="info" %}
Explore fields description in the Inspector by hovering your cursor over them.\
You can find more information about this here: [Tooltip Attribute](https://docs.unity3d.com/ScriptReference/TooltipAttribute.html).
{% endhint %}

***

## API

You can access this class by including the following namespace:

```csharp
using EasyBuildSystem.Features.Runtime.Buildings.Manager.Saver;
```

This class inherits from **Singleton** class and can be called like this:

```csharp
BuildingSaver.Instance
```

Here is a list of all the events and methods of this component that can be called:

{% tabs %}
{% tab title="Events" %}

#### Events

```csharp
//Called when the save starts.
BuildingSaver.Instance.OnStartSaveEvent.AddListener(() => { });

//Called when the save ends.
BuildingSaver.Instance.OnEndingSaveEvent.AddListener(() => { });

//Called when loading starts.
BuildingSaver.Instance.OnStartLoadingEvent.AddListener(() => { });

//Called when loading ends.
BuildingSaver.Instance.OnEndingLoadingEvent.AddListener(() => { });
```

{% endtab %}

{% tab title="Methods" %}

#### Methods

```csharp
//Force save.
BuildingSaver.Instance.ForceSave();

//Force load.
BuildingSaver.Instance.ForceLoad();
```

{% endtab %}
{% endtabs %}

All of the methods related to this component can be found in the file "BuildingSaver.cs".\
If you have any specific questions about the API, feel free to contact us.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://mindcodeinteractive.gitbook.io/easy-build-system-old/components/building-manager/building-saver.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
