> For the complete documentation index, see [llms.txt](https://kinematicsoup.gitbook.io/scene-fusion/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kinematicsoup.gitbook.io/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfscenesavewatcher.md).

# Class sfSceneSaveWatcher

Namespace: [KS.SceneFusion.Client.Unity.Editor](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor.md)\
Assembly: KSUnity-Source.dll

Provides pre and post scene save events.

```csharp
public class sfSceneSaveWatcher : AssetModificationProcessor
```

#### Inheritance

object ← AssetModificationProcessor ← [sfSceneSaveWatcher](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfscenesavewatcher.md)

## Methods

### Get() <a href="#ks_scenefusion_client_unity_editor_sfscenesavewatcher_get" id="ks_scenefusion_client_unity_editor_sfscenesavewatcher_get"></a>

```csharp
public static sfSceneSaveWatcher Get()
```

#### Returns

[sfSceneSaveWatcher](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfscenesavewatcher.md)

singleton instance

### OnWillSaveAssets(string\[]) <a href="#ks_scenefusion_client_unity_editor_sfscenesavewatcher_onwillsaveassets_system_string" id="ks_scenefusion_client_unity_editor_sfscenesavewatcher_onwillsaveassets_system_string"></a>

Called before assets are saved. Dispatches events for scenes that are about to be saved, then if any scenes were saved, dispatches a PostSave event on the next pre update.

```csharp
public static string[] OnWillSaveAssets(string[] paths)
```

#### Parameters

`paths` string\[]

paths to assets that will be saved.

#### Returns

string\[]

paths to assets that will be saved.

### PostSave <a href="#ks_scenefusion_client_unity_editor_sfscenesavewatcher_postsave" id="ks_scenefusion_client_unity_editor_sfscenesavewatcher_postsave"></a>

Invoked after scenes are saved.

```csharp
public event sfSceneSaveWatcher.PostSaveHandler PostSave
```

#### Event Type

[sfSceneSaveWatcher](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfscenesavewatcher.md).[PostSaveHandler](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfscenesavewatcher/ks.scenefusion.client.unity.editor.sfscenesavewatcher.postsavehandler.md)

### PreSave <a href="#ks_scenefusion_client_unity_editor_sfscenesavewatcher_presave" id="ks_scenefusion_client_unity_editor_sfscenesavewatcher_presave"></a>

Invoked before a scene is saved.

```csharp
public event sfSceneSaveWatcher.PreSaveHandler PreSave
```

#### Event Type

[sfSceneSaveWatcher](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfscenesavewatcher.md).[PreSaveHandler](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfscenesavewatcher/ks.scenefusion.client.unity.editor.sfscenesavewatcher.presavehandler.md)
