# OnSceneGUI(Terrain, IOnSceneGUI)

> Custom terrain tool OnSceneGUI callback.

## Definition

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

```csharp
public virtual void OnSceneGUI(Terrain terrain, IOnSceneGUI editContext)
```

### Parameters

**** (\[Terrain]\(/engine/6000.7/script-reference/unityengine/terrain)): Active Terrain object.**** (\[IOnSceneGUI]\(/engine/6000.7/script-reference/unityeditor/terraintools/ionscenegui)): Interface for communication between Editor and Paint tools.

### Remarks

Unity calls this method to run tool-specific scene UI and behavior.

Additional Resources: [Editor.OnSceneGUI()](/engine/6000.7/script-reference/unityeditor/editor/onscenegui.md), [SceneView](/engine/6000.7/script-reference/unityeditor/sceneview.md), [TerrainPaintTool\<T>.OnRenderBrushPreview](/engine/6000.7/script-reference/unityeditor/terraintools/terrainpainttool1/onrenderbrushpreview.md).
