> For the complete documentation index, see [llms.txt](https://glitch9.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://glitch9.gitbook.io/docs/unity-assets/serialization-saver/getting-started.md).

# Getting Started

#### 1. Setting Up Serialization Saver Settings

* Go to Assets > Create > Glitch9 > SerializationSaver > Settings to create a SerializationSaverSettings asset.
* \
  ![](https://lh7-us.googleusercontent.com/28uw51mkHbLrnm62treEG2LXUw3AkPwxBTIC9rmbOoqUfY22w9WsbGSRwkGloXxnVrpVD4G1v_h7Exo8lMUyy13huIl-cavkXcXwp67HP29e4raTFtI3J5ZmC3eVBthSrb8QbUQ2T4VTBgoW3jV5sCo)
* Configure the settings according to your project needs, such as specifying the JSON path for backups and enabling autosave<br>

#### 2. Using SnapBehaviour & SnapScriptableObject

**■ SnapBehaviour**

Attach the SnapBehaviour script to any GameObject you wish to serialize. Customize the SnapBehaviour script to include any properties or fields you want to be serialized.

```csharp
using Glitch9.Toolkits.SerializationSaver;

public class MyCustomBehaviour : SnapBehaviour
{
// Add your serializable fields here
}
```

**■ SnapScriptableObject**

Create a new ScriptableObject by extending SnapScriptableObject and define any serializable fields you need.

```csharp
using Glitch9.Toolkits.SerializationSaver;

[CreateAssetMenu(fileName = "MyCustomData", menuName = "MyCustom/MyCustomData")]
public class MyCustomData : SnapScriptableObject
{
// Add your serializable fields here
}
```

#### Serialization Actions

* Backup: Manually trigger a backup of your GameObject or ScriptableObject through the Inspector or programmatically by calling BackupToJson().
* Restore: Restore the state of an object from a JSON backup through the Inspector or by calling RestoreFromJson().
* AutoSave: Enable auto-saving in SerializationSaverSettings to automatically backup objects when changes are detected.

#### Viewing and Managing Snapshots

Open the SnapshotWindow from the Unity Editor to view, restore, or delete snapshots. This window allows you to manage the states of serialized objects with ease.


---

# 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://glitch9.gitbook.io/docs/unity-assets/serialization-saver/getting-started.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.
