# ApplyCustomUI(ITerrainLayerCustomUI, Terrain)

> Applies the custom UI for the Terrain Layer object.

## Definition

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

```csharp
public void ApplyCustomUI(ITerrainLayerCustomUI customUI, Terrain terrain)
```

### Parameters

**** (\[ITerrainLayerCustomUI]\(/engine/6000.6/script-reference/unityeditor/iterrainlayercustomui)): The custom UI object.**** (\[Terrain]\(/engine/6000.6/script-reference/unityengine/terrain)): The Terrain object.

### Remarks

The custom UI object is usually the same [ShaderGUI](/engine/6000.6/script-reference/unityeditor/shadergui.md) object implemented for the Terrain shader. This is because only the Terrain shader defines how to interpret data in a TerrainLayer object. To retrieve the custom UI object, cast the ShaderGUI object to the [ITerrainLayerCustomUI](/engine/6000.6/script-reference/unityeditor/iterrainlayercustomui.md) interface.
