# TreeInstance

> Contains information about a tree placed in the Terrain game object.

## Definition

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

```csharp
public struct TreeInstance
```

## Remarks

This struct can be accessed from the TerrainData Object.

## Fields

| Value                                                                                        | Description                                                                                                                                                             |
| -------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [color](/engine/6000.6/script-reference/unityengine/treeinstance/color.md)                   | Color of this instance.                                                                                                                                                 |
| [heightScale](/engine/6000.6/script-reference/unityengine/treeinstance/heightscale.md)       | Height scale of this instance (compared to the prototype's size).                                                                                                       |
| [lightmapColor](/engine/6000.6/script-reference/unityengine/treeinstance/lightmapcolor.md)   | Lightmap color calculated for this instance.                                                                                                                            |
| [position](/engine/6000.6/script-reference/unityengine/treeinstance/position.md)             | The position of the tree in the local space of the terrain. The value is a Vector3 clamped to 0-1, and describes a percentage of the terrain width, length, and height. |
| [prototypeIndex](/engine/6000.6/script-reference/unityengine/treeinstance/prototypeindex.md) | Index of this instance in the TerrainData.treePrototypes array.                                                                                                         |
| [rotation](/engine/6000.6/script-reference/unityengine/treeinstance/rotation.md)             | Read-only.                                                                                                                                                              |
| [widthScale](/engine/6000.6/script-reference/unityengine/treeinstance/widthscale.md)         | Width scale of this instance (compared to the prototype's size).                                                                                                        |
