class in UnityEngine
/
Inherits from:Collider2D
/
Implemented in:UnityEngine.Physics2DModule
Collider for 2D physics representing an arbitrary polygon defined by its vertices.
Additional resources: BoxCollider2D, CircleCollider2D, EdgeCollider2D.
| Property | Description |
|---|---|
| autoTiling | Determines whether the PolygonCollider2D's shape is automatically updated based on a SpriteRenderer's tiling properties. |
| pathCount | The number of paths in the polygon. |
| points | Corner points that define the collider's shape in local space. |
| useDelaunayMesh | When the value is true, the Collider uses an additional Delaunay triangulation step to produce the Collider mesh. When the value is false, this additional step does not occur. |
| Method | Description |
|---|---|
| CreatePrimitive | Creates as regular primitive polygon with the specified number of sides. |
| GetPath | Gets a path from the Collider by its index. |
| GetTotalPointCount | Return the total number of points in the polygon in all paths. |
| SetPath | Define a path by its constituent points. |
| Property | Description |
|---|---|
| enabled | Enabled Behaviours are Updated, disabled Behaviours are not. |