NavMeshAgents 需要避开的障碍物。
NavMeshObstacle 为圆柱形,能够以特定的速度沿着导航网格的表面移动。默认情况下,障碍物只会影响 agent 的“规避”行为,并不会影响其寻路行为。这意味着 agent 将在寻路时忽略障碍物,但需要在沿路径移动时绕过障碍物。如果已启用“雕刻”,障碍物会在导航网格中创建一个临时的“孔”。寻路时可识别该孔,因此所确定的路径将避开障碍物。这意味着如果障碍物阻挡了狭窄的间隙,寻路功能会寻找前往目的地的替代路线。如果没有雕刻功能,agent 会前往空隙处,但只能在清除障碍物后才能通过。
另请参阅:NavMeshAgent。
| carveOnlyStationary | 当障碍物不断移动时,是否应对其进行雕刻? |
| carving | 此障碍物是否应该切断导航网格。 |
| carvingMoveThreshold | 用于更新移动的雕刻孔的阈值距离(启用雕刻时)。 |
| carvingTimeToStationary | 将障碍物视为静止需要等待的时间(雕刻和 carveOnlyStationary 均已启用)。 |
| center | 在对象的局部空间中测量的障碍物中心。 |
| height | 障碍物圆柱形状的高度。 |
| radius | 障碍物胶囊体形状的半径。 |
| shape | 障碍物的形状。 |
| size | 在对象的局部空间中测量的障碍物的大小。 |
| velocity | 障碍物沿着导航网格移动的速度。 |
| enabled | 启用的 Behaviour 可更新,禁用的 Behaviour 不可更新。 |
| isActiveAndEnabled | 是否已激活并启用 Behaviour? |
| gameObject | 此组件附加到的游戏对象。始终将组件附加到游戏对象。 |
| tag | 此游戏对象的标签。 |
| transform | 附加到此 GameObject 的 Transform。 |
| hideFlags | 该对象应该隐藏、随场景一起保存还是由用户修改? |
| name | 对象的名称。 |
| BroadcastMessage | 调用此游戏对象或其任何子项中的每个 MonoBehaviour 上名为 methodName 的方法。 |
| CompareTag | 此游戏对象是否使用 tag 进行了标记? |
| GetComponent | Returns the component of Type type if the GameObject has one attached, null if it doesn't. Will also return disabled components. |
| GetComponentInChildren | 使用深度首次搜索返回 GameObject 或其任何子项中类型为 type 的组件。 |
| GetComponentInParent | 返回 GameObject 或其任何父项中类型为 type 的组件。 |
| GetComponents | 返回 GameObject 中类型为 type 的所有组件。 |
| GetComponentsInChildren | Returns all components of Type type in the GameObject or any of its children. Works recursively. |
| GetComponentsInParent | 返回 GameObject 或其任何父项中类型为 type 的所有组件。 |
| SendMessage | 调用此游戏对象中的每个 MonoBehaviour 上名为 methodName 的方法。 |
| SendMessageUpwards | 调用此游戏对象中的每个 MonoBehaviour 上或此行为的每个父级上名为 methodName 的方法。 |
| TryGetComponent | 获取指定类型的组件(如果存在)。 |
| GetInstanceID | 返回对象的实例 ID。 |
| ToString | 返回对象的名称。 |
| Destroy | 移除 GameObject、组件或资源。 |
| DestroyImmediate | 立即销毁对象 /obj/。强烈建议您改用 Destroy。 |
| DontDestroyOnLoad | 在加载新的 Scene 时,请勿销毁 Object。 |
| FindObjectOfType | 返回第一个类型为 type 的已加载的激活对象。 |
| FindObjectsOfType | Gets a list of all loaded objects of Type type. |
| Instantiate | 克隆 original 对象并返回克隆对象。 |
| bool | 该对象是否存在? |
| operator != | 比较两个对象是否引用不同的对象。 |
| operator == | 比较两个对象引用,判断它们是否引用同一个对象。 |