# GetPatchMinMaxHeights()

> Returns an array of min max height values for all the renderable patches in a terrain. The returned array can be modified and then passed to TerrainData.OverrideMinMaxPatchHeights.

## Definition

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

```csharp
public PatchExtents[] GetPatchMinMaxHeights()
```

### Returns

| Type                                                                            | Description                                       |
| ------------------------------------------------------------------------------- | ------------------------------------------------- |
| [PatchExtents\[\]](/engine/6000.0/script-reference/unityengine/patchextents.md) | Minimum and maximum height values for each patch. |
