Experimental: this API is experimental and might be changed or removed in the future.

NavMeshQuery.GetPolygonType

Switch to Manual

Parameters

polygon来自导航网格表面或链接的节点的标识符。

Returns

NavMeshPolyTypes Ground when the node is a polygon on a NavMesh surface.
OffMeshConnection when the node is a NavMeshLink or an Off-mesh Link.

Description

返回导航网格节点是多边形还是链接。

即使指定的节点在查询的 NavMeshWorld 中已经变为无效,也可以确定类型。

已知问题,待修复:如果查询的 NavMeshWorld 由于任何原因无效,此方法将返回 NavMeshPolyTypes.OffMeshConnection

另请参阅:NavMeshPolyTypesNavMeshQuery.IsValidNavMeshWorld.IsValid