# SetHoles(int, int, bool[,])

> Sets an array of Terrain holes samples.

## Definition

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

## SetHoles(int, int, Boolean\[0:,0:])

```csharp
public void SetHoles(int xBase, int yBase, bool[,] holes)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): First x index of Terrain holes samples to set.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): First y index of Terrain holes samples to set.**** (\[bool\[,]]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Array of Terrain holes samples to set (array indexed as \[y,x]).

### Remarks

Sets Terrain holes data using a two-dimensional array of Terrain holes samples. The samples are represented as bool values: `true` for surface and `false` for hole. The array dimensions define the area affected, which starts at `xBase` and `yBase`. The Terrain holes array is indexed as \[y,x].

This method recomputes all LOD and vegetation information for the Terrain on each call, which can be computationally expensive. In interactive editing scenarios, it might be better to call [TerrainData.SetHolesDelayLOD](/engine/6000.7/script-reference/unityengine/terraindata/setholesdelaylod.md) instead, followed by [TerrainData.SyncTexture](/engine/6000.7/script-reference/unityengine/terraindata/synctexture.md) when the user completes an editing action.
