Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetPoints(List<Vector2>)

Gets all the points that define a set of continuous edges.
Read time 1 minuteLast updated 6 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.Physics2DModule
public int GetPoints(List<Vector2> points)

Parameters

A list of Vector2 used to receive the points.

Returns

Type

Description

intReturns the number of points placed in the
points
list.

Remarks

Ensure the provided list capacity is large enough to contain all retrieved points you need. Unity automatically increases the list capacity if it is not large enough to contain all retrieved points. As the list is usually reused, it is recommended to make the list large enough to return a reasonable quantity of points for its expected use. If the list capacity does not need to be increased, then this function will not allocate any memory and no additional work is produced for the garbage collector.