Version: 2021.1

NavMeshPath.GetCornersNonAlloc

切换到手册
public int GetCornersNonAlloc (out Vector3[] results);

参数

results 存储路径角的数组。

返回

int 路径上角的数量,包括起点和终点。

描述

计算路径的角。

此函数类似于 corners 属性,不同之处在于其结果会返回到提供的数组中。

请注意,此函数要求提供的数组至少有 2 个元素。