# OnWillBeDeactivated()

> Invoked before the terrain paint tool with overlays stops being the active tool.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.TerrainTools](/engine/6000.3/script-reference/unityeditor/terraintools.md)
* **Assembly:** UnityEditor

```csharp
public override void OnWillBeDeactivated()
```
