# materialType

> The type of the material used to render the terrain. Could be one of the built-in types or custom. See Terrain.MaterialType.

## Definition

* **Type:** Property
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.TerrainModule

> **Warning:**
>
> **Deprecated.** Property materialType is not used any more. Set materialTemplate directly.

```csharp
public Terrain.MaterialType materialType { get; set; }
```

### Remarks

If you want to use a custom material, set this to [Terrain.MaterialType.Custom](/engine/6000.7/script-reference/unityengine/terrain/materialtype/custom.md), then assign a material to [\_materialTemplate](/engine/6000.7/script-reference/unityengine/terrain/materialtemplate.md). [Terrain.MaterialType.Custom](/engine/6000.7/script-reference/unityengine/terrain/materialtype/custom.md) with [\_materialTemplate](/engine/6000.7/script-reference/unityengine/terrain/materialtemplate.md) == null is identical to [Terrain.MaterialType.BuiltInLegacyDiffuse](/engine/6000.7/script-reference/unityengine/terrain/materialtype/builtinlegacydiffuse.md).
