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

# Class sfBaseUndoOperation

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

Base class for syncing an undo operation. Undo operations are recorded on our custom undo stack by calling sfUndoManager.Get().Record(sfIUndoOperation). When the operation is undone or redone, the corresponding method is called on the operation to sync the changes.

```csharp
public abstract class sfBaseUndoOperation
```

#### Inheritance

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

#### Derived

[sfUndoOcclusionSettingsOperation](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfundoocclusionsettingsoperation.md), [sfUndoReorderChildrenOperation](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfundoreorderchildrenoperation.md), [sfUndoTerrainOperation](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfundoterrainoperation.md), [sfUndoTerrainTreeOperation](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfundoterraintreeoperation.md)

## Properties

### CanCombine <a href="#ks_scenefusion_client_unity_editor_sfbaseundooperation_cancombine" id="ks_scenefusion_client_unity_editor_sfbaseundooperation_cancombine"></a>

Can this undo operation be combined with another operation?

```csharp
public virtual bool CanCombine { get; }
```

#### Property Value

bool

### GameObjects <a href="#ks_scenefusion_client_unity_editor_sfbaseundooperation_gameobjects" id="ks_scenefusion_client_unity_editor_sfbaseundooperation_gameobjects"></a>

Game objects affected by the operation.

```csharp
public virtual GameObject[] GameObjects { get; }
```

#### Property Value

GameObject\[]

## Methods

### CombineWith(sfBaseUndoOperation) <a href="#ks_scenefusion_client_unity_editor_sfbaseundooperation_combinewith_ks_scenefusion_client_unity_edito" id="ks_scenefusion_client_unity_editor_sfbaseundooperation_combinewith_ks_scenefusion_client_unity_edito"></a>

Combines another operation with this one.

```csharp
public virtual bool CombineWith(sfBaseUndoOperation other)
```

#### Parameters

`other` [sfBaseUndoOperation](/scene-fusion/api-reference/ks.scenefusion.client.unity.editor/ks.scenefusion.client.unity.editor.sfbaseundooperation.md)

#### Returns

bool

true if the operations could be combined.

### HandleUndoRedo(bool) <a href="#ks_scenefusion_client_unity_editor_sfbaseundooperation_handleundoredo_system_boolean" id="ks_scenefusion_client_unity_editor_sfbaseundooperation_handleundoredo_system_boolean"></a>

Called to sync changes by an undo or redo operation.

```csharp
public abstract void HandleUndoRedo(bool isUndo)
```

#### Parameters

`isUndo` bool

true if this is an undo operation, false if it is a redo.
