# GetTreeInstance(int)

> Gets the tree instance at the specified index. It is used as a faster version of TerrainData.treeInstances [index] as this function doesn't create the entire tree instances array.

## Definition

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

```csharp
public TreeInstance GetTreeInstance(int index)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The index of the tree instance.

### Returns

| Type                                                                        | Description |
| --------------------------------------------------------------------------- | ----------- |
| [TreeInstance](/engine/6000.5/script-reference/unityengine/treeinstance.md) |             |
