# Create

> Create a Polygon from the specified vertices. The number of vertices must be in the range 3 to PhysicsConstants.MaxPolygonVertices.

## Definition

* **Type:** Method
* **Namespace:** [Unity.U2D.Physics](/engine/6000.5/script-reference/unity/u2d/physics.md)
* **Assembly:** UnityEngine.PhysicsCore2DModule

## Create(ReadOnlySpan\<Vector2>, float)

Create a Polygon from the specified vertices. The number of vertices must be in the range 3 to [PhysicsConstants.MaxPolygonVertices](/engine/6000.5/script-reference/unity/u2d/physics/physicsconstants/maxpolygonvertices.md).

```csharp
public static PolygonGeometry Create(ReadOnlySpan<Vector2> vertices, float radius = 0)
```

### Parameters

**** (\[ReadOnlySpan\<Vector2>]\(https\://learn.microsoft.com/dotnet/api/system.readonlyspan-1)): The vertices to use.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The radius to use.

### Returns

| Type                                                                                    | Description           |
| --------------------------------------------------------------------------------------- | --------------------- |
| [PolygonGeometry](/engine/6000.5/script-reference/unity/u2d/physics/polygongeometry.md) | The created geometry. |

## Create(ReadOnlySpan\<Vector2>, float, PhysicsTransform)

Create a Polygon from the specified vertices. The number of vertices must be in the range 3 to [PhysicsConstants.MaxPolygonVertices](/engine/6000.5/script-reference/unity/u2d/physics/physicsconstants/maxpolygonvertices.md).

```csharp
public static PolygonGeometry Create(ReadOnlySpan<Vector2> vertices, float radius, PhysicsTransform transform)
```

### Parameters

**** (\[ReadOnlySpan\<Vector2>]\(https\://learn.microsoft.com/dotnet/api/system.readonlyspan-1)): The vertices to use.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The radius to use.**** (\[PhysicsTransform]\(/engine/6000.5/script-reference/unity/u2d/physics/physicstransform)): The transform used to specify where the geometry is positioned.

### Returns

| Type                                                                                    | Description           |
| --------------------------------------------------------------------------------------- | --------------------- |
| [PolygonGeometry](/engine/6000.5/script-reference/unity/u2d/physics/polygongeometry.md) | The created geometry. |

## Create(ReadOnlySpan\<Vector2>, float, Matrix4x4)

Create a Polygon from the specified vertices. The number of vertices must be in the range 3 to [PhysicsConstants.MaxPolygonVertices](/engine/6000.5/script-reference/unity/u2d/physics/physicsconstants/maxpolygonvertices.md).

```csharp
public static PolygonGeometry Create(ReadOnlySpan<Vector2> vertices, float radius, Matrix4x4 transform)
```

### Parameters

**** (\[ReadOnlySpan\<Vector2>]\(https\://learn.microsoft.com/dotnet/api/system.readonlyspan-1)): The vertices to use.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The radius to use.**** (\[Matrix4x4]\(/engine/6000.5/script-reference/unityengine/matrix4x4)): The transform used to specify where the geometry is positioned.

### Returns

| Type                                                                                    | Description           |
| --------------------------------------------------------------------------------------- | --------------------- |
| [PolygonGeometry](/engine/6000.5/script-reference/unity/u2d/physics/polygongeometry.md) | The created geometry. |

## Create(ConvexHull, float)

Create a Polygon from the specified convex hull.

```csharp
public static PolygonGeometry Create(ref PolygonGeometry.ConvexHull convexHull, float radius)
```

### Parameters

**** (\[ConvexHull]\(/engine/6000.5/script-reference/unity/u2d/physics/polygongeometry/convexhull)): The convex hull to create the polygon from.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The radius to use.

### Returns

| Type                                                                                    | Description           |
| --------------------------------------------------------------------------------------- | --------------------- |
| [PolygonGeometry](/engine/6000.5/script-reference/unity/u2d/physics/polygongeometry.md) | The created geometry. |
