Legacy Documentation: Version 2018.1 (Go to current version)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

TerrainData.GetTreeInstance

public TreeInstance GetTreeInstance(int index);

Parameters

indexThe index of the tree instance.

Description

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

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