Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


treeInstances

Contains the current trees placed in the terrain.
Read time 1 minuteLast updated 4 days ago

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.TerrainModule
public TreeInstance[] treeInstances { get; set; }

Remarks

Note that setting the treeInstances property will not automatically snap Tree instances onto the surface of the Terrain heightmap. To do so, use TerrainData.SetTreeInstances instead.