> 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.sfunityeventdispatcher.md).

# Class sfUnityEventDispatcher

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

Listens for and dispatches Unity events, in some cases changing the parameters of the event. Allows all events to be enabled or disabled. Register with this class instead of directly against the Unity events to ensure you do not respond to events that were triggered by Scene Fusion.

```csharp
public class sfUnityEventDispatcher
```

#### Inheritance

object ← [sfUnityEventDispatcher](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.md)

## Properties

### Enabled <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_enabled" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_enabled"></a>

Are events enabled?

```csharp
public bool Enabled { get; }
```

#### Property Value

bool

## Methods

### Disable() <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_disable" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_disable"></a>

Disables events. Stops listening for Unity events.

```csharp
public void Disable()
```

### Enable() <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_enable" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_enable"></a>

Enables events. Starts listening for Unity events.

```csharp
public void Enable()
```

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

```csharp
public static sfUnityEventDispatcher Get()
```

#### Returns

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

singleton instance

### InvokeOnAddOrRemoveComponents(GameObject) <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_invokeonaddorremovecomponents_unityengine" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_invokeonaddorremovecomponents_unityengine"></a>

Invokes the on add or remove components event.

```csharp
public void InvokeOnAddOrRemoveComponents(GameObject gameObject)
```

#### Parameters

`gameObject` GameObject

gameObject with added or removed components.

### InvokeOnCreate(GameObject) <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_invokeoncreate_unityengine_gameobject" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_invokeoncreate_unityengine_gameobject"></a>

Invokes the on create event.

```csharp
public void InvokeOnCreate(GameObject gameObject)
```

#### Parameters

`gameObject` GameObject

gameObject that was created.

### InvokeOnCreatePrefabChild(GameObject) <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_invokeoncreateprefabchild_unityengine_game" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_invokeoncreateprefabchild_unityengine_game"></a>

Invokes the on create prefab child event.

```csharp
public void InvokeOnCreatePrefabChild(GameObject gameObject)
```

#### Parameters

`gameObject` GameObject

gameObject in prefab that had one or more new child objects created.

### InvokeOnDelete(ulong) <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_invokeondelete_system_uint64" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_invokeondelete_system_uint64"></a>

Invokes the on delete event.

```csharp
public void InvokeOnDelete(ulong uobjectId)
```

#### Parameters

`uobjectId` ulong

Id of game object that was deleted.

### InvokeOnHeightmapChange(Terrain, RectInt, bool) <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_invokeonheightmapchange_unityengine_terrai" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_invokeonheightmapchange_unityengine_terrai"></a>

Invokes the on heightmap change event. This fires when the terrain heightmap changed.

```csharp
public void InvokeOnHeightmapChange(Terrain terrain, RectInt changeArea, bool synced)
```

#### Parameters

`terrain` Terrain

the Terrain object that references a changed TerrainData asset.

`changeArea` RectInt

the area that the heightmap changed.

`synced` bool

indicates whether the changes were fully synchronized back to CPU memory.

### InvokeOnHierarchyStructureChange(GameObject) <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_invokeonhierarchystructurechange_unityengi" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_invokeonhierarchystructurechange_unityengi"></a>

Invokes the on hierarchy strcture change event. This event means anything may have changed on the game object or any of its descendants.

```csharp
public void InvokeOnHierarchyStructureChange(GameObject gameObject)
```

#### Parameters

`gameObject` GameObject

### InvokeOnModifyObject(ulong) <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_invokeonmodifyobject_system_uint64" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_invokeonmodifyobject_system_uint64"></a>

Invokes the on modify object event.

```csharp
public void InvokeOnModifyObject(ulong uobjectId)
```

#### Parameters

`uobjectId` ulong

Id of modified uobject.

### InvokeOnModifyProperties(UndoPropertyModification\[]) <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_invokeonmodifyproperties_unityeditor_undop" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_invokeonmodifyproperties_unityeditor_undop"></a>

Invokes the on modify properties event.

```csharp
public UndoPropertyModification[] InvokeOnModifyProperties(UndoPropertyModification[] modifications)
```

#### Parameters

`modifications` UndoPropertyModification\[]

#### Returns

UndoPropertyModification\[]

modifications that are allowed.

### InvokeOnParentChange(GameObject) <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_invokeonparentchange_unityengine_gameobjec" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_invokeonparentchange_unityengine_gameobjec"></a>

Invokes the on parent change event.

```csharp
public void InvokeOnParentChange(GameObject gameObject)
```

#### Parameters

`gameObject` GameObject

gameObject whose parent changed.

### InvokeOnPropertiesChanged(Object) <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_invokeonpropertieschanged_unityengine_obje" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_invokeonpropertieschanged_unityengine_obje"></a>

Invokes the on properties changed event. This fires when properties changed but we don't know which properties changed.

```csharp
public void InvokeOnPropertiesChanged(Object uobj)
```

#### Parameters

`uobj` Object

uobj whose properties changed.

### InvokeOnReorderChildren(GameObject) <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_invokeonreorderchildren_unityengine_gameob" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_invokeonreorderchildren_unityengine_gameob"></a>

Invokes the on reorder children event for a game object.

```csharp
public void InvokeOnReorderChildren(GameObject gameObj)
```

#### Parameters

`gameObj` GameObject

gameObj to invoke the event for.

### InvokeOnTerrainDetailChange(Terrain, RectInt, int) <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_invokeonterraindetailchange_unityengine_te" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_invokeonterraindetailchange_unityengine_te"></a>

Invokes the on terrain detail change event.

```csharp
public void InvokeOnTerrainDetailChange(Terrain terrain, RectInt changeArea, int layer)
```

#### Parameters

`terrain` Terrain

terrain component that references a changed TerrainData asset.

`changeArea` RectInt

changeArea of the details that changed.

`layer` int

layer containing the changes.

### InvokeOnTerrainTreeChange(Terrain, bool) <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_invokeonterraintreechange_unityengine_terr" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_invokeonterraintreechange_unityengine_terr"></a>

Invokes the on terrain tree change event.

```csharp
public void InvokeOnTerrainTreeChange(Terrain terrain, bool hasRemovals)
```

#### Parameters

`terrain` Terrain

terrain component that references a changed TerrainData asset.

`hasRemovals` bool

true if trees were removed. Trees may have also been added when this is true.

### InvokeOnTextureChange(Terrain, string, RectInt, bool) <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_invokeontexturechange_unityengine_terrain" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_invokeontexturechange_unityengine_terrain"></a>

Invokes the on texture change event. This fires when the terrain textures changed.

```csharp
public void InvokeOnTextureChange(Terrain terrain, string textureName, RectInt changeArea, bool synced)
```

#### Parameters

`terrain` Terrain

the Terrain object that references a changed TerrainData asset.

`textureName` string

the name of the texture that changed.

`changeArea` RectInt

the region of the Terrain texture that changed, in texel coordinates.

`synced` bool

indicates whether the changes were fully synchronized back to CPU memory.

### InvokeOnUpdatePrefabInstance(GameObject) <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_invokeonupdateprefabinstance_unityengine_g" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_invokeonupdateprefabinstance_unityengine_g"></a>

Invokes the on update prefab instance event for a game object.

```csharp
public void InvokeOnUpdatePrefabInstance(GameObject gameObject)
```

#### Parameters

`gameObject` GameObject

prefab root instance that was updated because its source prefab was modified.

### InvokeOnUpdatePrefabInstances() <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_invokeonupdateprefabinstances" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_invokeonupdateprefabinstances"></a>

Invokes the on update prefab instances event.

```csharp
public void InvokeOnUpdatePrefabInstances()
```

### InvokePostModifyProperties(UndoPropertyModification\[]) <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_invokepostmodifyproperties_unityeditor_und" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_invokepostmodifyproperties_unityeditor_und"></a>

Invokes the post modify properties event.

```csharp
public void InvokePostModifyProperties(UndoPropertyModification[] modifications)
```

#### Parameters

`modifications` UndoPropertyModification\[]

### TempEnable(Action) <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_tempenable_system_action" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_tempenable_system_action"></a>

If the dispatcher is already enabled, calls the callback. Otherwise enables the dispatcher before calling the callback and disables it again afterwards.

```csharp
public void TempEnable(Action callback)
```

#### Parameters

`callback` Action

callback to call with the dispatcher enabled.

### OnAddOrRemoveComponents <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onaddorremovecomponents" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onaddorremovecomponents"></a>

Invoked when components are added to or removed from a game object.

```csharp
public event sfUnityEventDispatcher.AddOrRemoveComponentsCallback OnAddOrRemoveComponents
```

#### Event Type

[sfUnityEventDispatcher](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.md).[AddOrRemoveComponentsCallback](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.addorremovecomponentscallback.md)

### OnClosePrefabStage <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_oncloseprefabstage" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_oncloseprefabstage"></a>

Invoked when a prefab stage is closed.

```csharp
public event sfUnityEventDispatcher.ClosePrefabStageHandler OnClosePrefabStage
```

#### Event Type

[sfUnityEventDispatcher](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.md).[ClosePrefabStageHandler](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.closeprefabstagehandler.md)

### OnCloseScene <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onclosescene" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onclosescene"></a>

Invoked when a scene is closed.

```csharp
public event EditorSceneManager.SceneClosingCallback OnCloseScene
```

#### Event Type

EditorSceneManager.SceneClosingCallback

### OnCreate <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_oncreate" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_oncreate"></a>

Invoked when a game object is created. Only invoked if an undo operation is registered for the object creation.

```csharp
public event sfUnityEventDispatcher.CreateCallback OnCreate
```

#### Event Type

[sfUnityEventDispatcher](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.md).[CreateCallback](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.createcallback.md)

### OnCreatePrefabChild <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_oncreateprefabchild" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_oncreateprefabchild"></a>

Invoked when one or more child game objects are created in a prefab.

```csharp
public event sfUnityEventDispatcher.CreatePrefabChildCallback OnCreatePrefabChild
```

#### Event Type

[sfUnityEventDispatcher](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.md).[CreatePrefabChildCallback](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.createprefabchildcallback.md)

### OnDelete <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_ondelete" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_ondelete"></a>

Invoked when a game object is deleted.

```csharp
public event sfUnityEventDispatcher.DeleteCallback OnDelete
```

#### Event Type

[sfUnityEventDispatcher](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.md).[DeleteCallback](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.deletecallback.md)

### OnHierarchyStructureChange <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onhierarchystructurechange" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onhierarchystructurechange"></a>

Invoked when an action is performed that changes a game object and possibly any of its descendants, and we don't know what specifically changed. Examples of such actions are unpacking or reverting a prefab instance, or any changes made after calling Undo.RegisterFullObjectHierarchyUndo.

```csharp
public event sfUnityEventDispatcher.HierarchyStructureChangeCallback OnHierarchyStructureChange
```

#### Event Type

[sfUnityEventDispatcher](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.md).[HierarchyStructureChangeCallback](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.hierarchystructurechangecallback.md)

### OnImportAssets <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onimportassets" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onimportassets"></a>

Invoked when assets are imported or renamed.

```csharp
public event ksEditorEvents.ImportAssetsHandler OnImportAssets
```

#### Event Type

ksEditorEvents.ImportAssetsHandler

### OnModifyObject <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onmodifyobject" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onmodifyobject"></a>

Invoked when an object is modified and an undo operation is recorded for it. This is not fired on modified descendants for hierarchy structure change events.

```csharp
public event sfUnityEventDispatcher.ModifyObjectHandler OnModifyObject
```

#### Event Type

[sfUnityEventDispatcher](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.md).[ModifyObjectHandler](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.modifyobjecthandler.md)

### OnModifyProperties <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onmodifyproperties" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onmodifyproperties"></a>

Invoked when properties are modified. When properties are edited by dragging, this will fire continuosuly as the values change, and PostModifyProperties will fire once when dragging stops.

```csharp
public event Undo.PostprocessModifications OnModifyProperties
```

#### Event Type

Undo.PostprocessModifications

### OnOpenPrefabStage <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onopenprefabstage" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onopenprefabstage"></a>

Invoked when a prefab stage is opened.

```csharp
public event sfUnityEventDispatcher.OpenPrefabStageHandler OnOpenPrefabStage
```

#### Event Type

[sfUnityEventDispatcher](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.md).[OpenPrefabStageHandler](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.openprefabstagehandler.md)

### OnOpenScene <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onopenscene" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onopenscene"></a>

Invoked when a scene is opened or a new scene is created.

```csharp
public event EditorSceneManager.SceneOpenedCallback OnOpenScene
```

#### Event Type

EditorSceneManager.SceneOpenedCallback

### OnParentChange <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onparentchange" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onparentchange"></a>

Invoked when a game object's parent changes.

```csharp
public event sfUnityEventDispatcher.ParentChangeCallback OnParentChange
```

#### Event Type

[sfUnityEventDispatcher](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.md).[ParentChangeCallback](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.parentchangecallback.md)

### OnPropertiesChanged <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onpropertieschanged" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onpropertieschanged"></a>

Invoked when properties on a uobject changed, but we don't know which properties.

```csharp
public event sfUnityEventDispatcher.PropertiesChangedCallback OnPropertiesChanged
```

#### Event Type

[sfUnityEventDispatcher](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.md).[PropertiesChangedCallback](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.propertieschangedcallback.md)

### OnReorderChildren <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onreorderchildren" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onreorderchildren"></a>

Invoked when a game object's children are reordered.

```csharp
public event sfUnityEventDispatcher.ReorderChildrenCallback OnReorderChildren
```

#### Event Type

[sfUnityEventDispatcher](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.md).[ReorderChildrenCallback](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.reorderchildrencallback.md)

### OnSavePrefabStage <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onsaveprefabstage" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onsaveprefabstage"></a>

Invoked when a prefab stage is saved.

```csharp
public event sfUnityEventDispatcher.SavePrefabStageHandler OnSavePrefabStage
```

#### Event Type

[sfUnityEventDispatcher](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.md).[SavePrefabStageHandler](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.saveprefabstagehandler.md)

### OnTerrainCheck <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onterraincheck" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onterraincheck"></a>

Invoked periodically when a terrain component is inspected to check for terrain changes that don't have Unity events.

```csharp
public event sfUnityEventDispatcher.TerrainCheckCallback OnTerrainCheck
```

#### Event Type

[sfUnityEventDispatcher](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.md).[TerrainCheckCallback](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.terraincheckcallback.md)

### OnTerrainDetailChange <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onterraindetailchange" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onterraindetailchange"></a>

Invoked when a terrain's details are changed.

```csharp
public event sfUnityEventDispatcher.TerrainDetailChangedCallback OnTerrainDetailChange
```

#### Event Type

[sfUnityEventDispatcher](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.md).[TerrainDetailChangedCallback](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.terraindetailchangedcallback.md)

### OnTerrainHeightmapChange <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onterrainheightmapchange" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onterrainheightmapchange"></a>

Invoked when a terrain's heightmap is changed.

```csharp
public event TerrainCallbacks.HeightmapChangedCallback OnTerrainHeightmapChange
```

#### Event Type

TerrainCallbacks.HeightmapChangedCallback

### OnTerrainTextureChange <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onterraintexturechange" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onterraintexturechange"></a>

Invoked when a terrain's textures are changed

```csharp
public event TerrainCallbacks.TextureChangedCallback OnTerrainTextureChange
```

#### Event Type

TerrainCallbacks.TextureChangedCallback

### OnTerrainTreeChange <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onterraintreechange" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onterraintreechange"></a>

Invoked when a terrain's trees are changed.

```csharp
public event sfUnityEventDispatcher.TerrainTreeChangedCallback OnTerrainTreeChange
```

#### Event Type

[sfUnityEventDispatcher](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.md).[TerrainTreeChangedCallback](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.terraintreechangedcallback.md)

### OnUpdate <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onupdate" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onupdate"></a>

Invoked every update after processing server RPCs.

```csharp
public event sfUnityEventDispatcher.UpdateHandler OnUpdate
```

#### Event Type

[sfUnityEventDispatcher](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.md).[UpdateHandler](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.updatehandler.md)

### OnUpdatePrefabInstance <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onupdateprefabinstance" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onupdateprefabinstance"></a>

Invoked when a prefab instance is updated because its source prefab was modified. This is always called with the prefab root instance.

```csharp
public event sfUnityEventDispatcher.UpdatePrefabInstanceCallback OnUpdatePrefabInstance
```

#### Event Type

[sfUnityEventDispatcher](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.md).[UpdatePrefabInstanceCallback](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.updateprefabinstancecallback.md)

### OnUpdatePrefabInstances <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onupdateprefabinstances" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_onupdateprefabinstances"></a>

Invoked when prefab instances are updated because their prefab was updated, before on update prefab instance is invoked for each updated prefab instance.

```csharp
public event sfUnityEventDispatcher.UpdatePrefabInstancesHandler OnUpdatePrefabInstances
```

#### Event Type

[sfUnityEventDispatcher](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.md).[UpdatePrefabInstancesHandler](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.updateprefabinstanceshandler.md)

### PostModifyProperties <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_postmodifyproperties" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_postmodifyproperties"></a>

Invoked after properties are modified. When properties are edited by dragging, OnModifyProperties will fire continuously as the values change, and this will fire once when dragging stops.

```csharp
public event sfUnityEventDispatcher.PostModifyPropertiesHandler PostModifyProperties
```

#### Event Type

[sfUnityEventDispatcher](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.md).[PostModifyPropertiesHandler](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.postmodifypropertieshandler.md)

### PreUpdate <a href="#ks_scenefusion_client_unity_editor_sfunityeventdispatcher_preupdate" id="ks_scenefusion_client_unity_editor_sfunityeventdispatcher_preupdate"></a>

Invoked every update before processing server RPCs.

```csharp
public event sfUnityEventDispatcher.UpdateHandler PreUpdate
```

#### Event Type

[sfUnityEventDispatcher](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.md).[UpdateHandler](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfunityeventdispatcher/ks.scenefusion.client.unity.editor.sfunityeventdispatcher.updatehandler.md)
