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

NavMeshQuery.EndFindPath

Switch to Manual
public Experimental.AI.PathQueryStatus EndFindPath (out int pathSize);

Parameters

pathSize引用 int,且此 int 将被设置为找到的路径中的导航网格节点数量。

Returns

PathQueryStatus Success when the number of nodes in the path was retrieved correctly.
PartialPath when a path was found but it falls short of the desired end location.
Failure when the path size can not be evaluated because the preceding call to UpdateFindPath was not successful.

Description

获取在成功的 NavMeshQuery.UpdateFindPath 操作期间计算的路径中的节点数量。

此方法准备了路径数据,以便随后可以使用 NavMeshQuery.GetPathResult 来检索构成路径的 PolygonId 值的实际数组。

重要信息:此方法只应在寻路操作结束时调用一次。多次调用可能会破坏已存储的路径。

另请参阅:PathQueryStatus