# GetTerrainGIChunks(Terrain, ref int, ref int)

> Get how many chunks the terrain is divided into for GI baking.

## Definition

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

## GetTerrainGIChunks(Terrain, int, int)

```csharp
public static void GetTerrainGIChunks(Terrain terrain, ref int numChunksX, ref int numChunksY)
```

### Parameters

**** (\[Terrain]\(/engine/6000.0/script-reference/unityengine/terrain)): The terrain.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Number of chunks in terrain width.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Number of chunks in terrain length.
