ドキュメント

Unity Engine

Download Unity

Unity Engine

ComputeDetailCoverage(int)

This function computes and returns the coverage (how many instances fit in a square unit) of a detail prototype, given its index.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.TerrainModule
public float ComputeDetailCoverage(int detailPrototypeIndex)

Parameters

detailPrototypeIndex

The index of the detail prototype in the TerrainData.detailPrototypes array.

Returns

Type

Description

floatThe coverage of the detail prototype, in instances per unit squared.

Remarks

Computes detail coverage. In DetailScatterMode.CoverageMode, this coverage represents the number of scattered instances per unit squared, based on the detail prototype's size and density settings. Unavailable in DetailScatterMode.InstanceCountMode.