TreeInstance

struct in UnityEngine

/

Implemented in:UnityEngine.TerrainModule

Description

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

This struct can be accessed from the TerrainData Object.

Properties

Property Description
colorColor of this instance.
heightScaleHeight scale of this instance (compared to the prototype's size).
lightmapColorLightmap color calculated for this instance.
positionThe 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.
prototypeIndexIndex of this instance in the TerrainData.treePrototypes array.
rotationRead-only.Rotation of the tree on X-Z plane (in radians).
widthScaleWidth scale of this instance (compared to the prototype's size).

Did you find this page useful? Please give it a rating: