# ExportHolesmapTexture

### Export Holesmap Texture

```csharp
Texture2D ExportHolesmapTexture(int resolution = 0)
```

Exports holesmap texture from [TerrainData](https://docs.unity3d.com/ScriptReference/TerrainData.html) object.

If  *<mark style="color:blue;">resolution</mark>* property is set to **0**, then exported texture size is read from the [TerrainData](https://docs.unity3d.com/ScriptReference/TerrainData.html).

***

```csharp
Texture2D[] ExportHolesmapTexture(int resolution, int splitCountHorizontal, int splitCountVertical)
```

Splits terrain into 2D grid by *<mark style="color:blue;">splitCountHorizontal</mark>* and *<mark style="color:blue;">splitCountVertical</mark>* amount and for each chunk calculates Holesmap texture.

***

```csharp
Texture2D ExportHolesmapTexture(int resolution, int splitCountHorizontal, int splitCountVertical, int splitColumnIndex, int splitRowIndex)
```

Splits terrain into 2D grid by *<mark style="color:blue;">splitCountHorizontal</mark>* and *<mark style="color:blue;">splitCountVertical</mark>* amount and calculates Holesmap texture for chunk with index *<mark style="color:blue;">splitColumnIndex</mark>* and *<mark style="color:blue;">splitRowIndex</mark>*.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://amazing-assets.gitbook.io/terrain-to-mesh/run-time-api/terraintomesh/exportholesmaptexture.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
