文档

Unity Engine


User Manual

Script Reference

Unity Engine


SetLayerCost(int, float)

Sets the cost for traversing over geometry of the layer type on all agents.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Method
  • Namespace: UnityEngine.AI
  • Assembly: UnityEngine.AIModule
警告
Deprecated. Use SetAreaCost instead.
public static void SetLayerCost(int layer, float cost)

Parameters

layer


cost

Remarks

This will replace any custom layer costs on all agents.