public int GetPath (int index, Vector2[] points);

Parameters

indexThe index of the path from 0 to pathCount minus 1.
pointsAn ordered array of the vertices (points) in the selected path.

Returns

int 返回放置在 points 数组中的点数。

Description

根据碰撞体的索引获取其路径。

路径 是在定义碰撞体轮廓的各点之间的线段的循环序列。碰撞体可能有孔和不连续部分,因此其形状不一定由单个路径定义。

返回放置在 points 数组中的点数。

另请参阅:GetPathPointCountpathCount


Parameters

indexThe index of the path from 0 to pathCount minus 1.
pointsAn ordered list of the vertices (points) in the selected path.

Returns

void Returns the number of points placed in the points list.

Description

根据碰撞体的索引获取其路径。

路径 是在定义碰撞体轮廓的各点之间的线段的循环序列。碰撞体可能有孔和不连续部分,因此其形状不一定由单个路径定义。

The integer return value is the number of results written into the results list. The results list will be resized if it doesn't contain enough elements to report all the results. This prevents memory from being allocated for results when the results list does not need to be resized, and improves garbage collection performance when the query is performed frequently.

另请参阅:GetPathPointCountpathCount