> 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.
