# OnPaint(Terrain, IOnPaint)

> Custom Terrain Tool paint callback.

## Definition

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

```csharp
public virtual bool OnPaint(Terrain terrain, IOnPaint editContext)
```

### Parameters

**** (\[Terrain]\(/engine/6000.3/script-reference/unityengine/terrain)): Active Terrain object.**** (\[IOnPaint]\(/engine/6000.3/script-reference/unityeditor/terraintools/ionpaint)): Interface used to communicate between Editor and Paint tools.

### Returns

| Type                                                          | Description                                                                    |
| ------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Return true to temporarily hide tree, grass, and detail layers on the terrain. |
