Documentation

Unity Engine


User Manual

Script Reference

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.
Read time 1 minuteLast updated 6 days ago

Definition

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

Parameters

detailPrototypeIndex

Returns

Type

Description

float

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.