Version: 2023.2
public static AI.NavMeshLinkInstance AddLink (AI.NavMeshLinkData link);

参数

link Object that describes the properties of the link.

返回

NavMeshLinkInstance Object that identifies the added link.

描述

向导航网格添加链接。此链接由 NavMeshLinkData 结构描述。

Returns an instance identifier for the added link.

如果已成功添加链接,则返回的实例有效。该实例可用于稍后使用 RemoveLink() 删除链接。

**注意:**如果区域设置为 Not Walkable,或者如果添加链接会超出活动链接的最大数 (65535),则无法添加链接 – 且有效属性为 false。

See Also: RemoveLink.


public static AI.NavMeshLinkInstance AddLink (AI.NavMeshLinkData link, Vector3 position, Quaternion rotation);

参数

link Object that describes the properties of the link.
position 将链接转换至此位置。
rotation 将链接旋转至此方向。

返回

NavMeshLinkInstance Object that identifies the added link.

描述

向导航网格添加链接。此链接由 NavMeshLinkData 结构描述。

Returns an instance identifier for the added link.

此函数类似于上方的 AddLink,但指定的位置和旋转适用于链接的起点和终点位置。旋转也可指定链接的本地向上轴。

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961