NavMeshAgent.SetAreaCost

public void SetAreaCost(int areaIndex, float areaCost);

Parameters

areaIndexArea cost.
areaCostNew cost for the specified area index.

Description

Sets the cost for traversing over areas of the area type.

If you enable or disable the agent then the cost will be reset to the default layer cost.

对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答