# OnDisable()

> Called when the state machine is unloaded, or goes out of scope in the editor.

## Definition

* **Type:** Method
* **Namespace:** [Unity.GraphToolkit.Editor](/engine/6000.7/script-reference/unity/graphtoolkit/editor.md)
* **Assembly:** UnityEditor

```csharp
public virtual void OnDisable()
```

### Remarks

Override this method to release resources, clear temporary data, or perform any required cleanup.
