ドキュメント

Unity Engine

Unity Engine

GetAreaCost(int)

Gets the cost for path finding over geometry of the area type.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Method
  • Namespace: UnityEngine.AI
  • Assembly: UnityEngine.AIModule
public static float GetAreaCost(int areaIndex)

Parameters

areaIndex

Index of the area to get.

Returns

Type

Description

float

Remarks

The value applies to all agents unless the value has been customized per agent by calling NavMeshAgent.SetAreaCost.
Use NavMesh.GetAreaFromName to find the area index based on the name of the NavMesh area type.
Additional Resources: Areas and Costs