# CreateBox

> Create a Polygon as a four-sided box.

## Definition

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

## CreateBox(Vector2, float, bool)

Create a Polygon as a four-sided box.

```csharp
public static PolygonGeometry CreateBox(Vector2 size, float radius = 0, bool inscribe = false)
```

### Parameters

**** (\[Vector2]\(/engine/6000.5/script-reference/unityengine/vector2)): The full size of the box.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The radius to use.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): When true, the specified size will be inclusive of the specified radius. If true, a warning will be produced if the radius is greater-than or equal-to twice the specified size.

### Returns

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

## CreateBox(Vector2, float, PhysicsTransform, bool)

Create a Polygon as a four-sided box.

```csharp
public static PolygonGeometry CreateBox(Vector2 size, float radius, PhysicsTransform transform, bool inscribe = false)
```

### Parameters

**** (\[Vector2]\(/engine/6000.5/script-reference/unityengine/vector2)): The full size of the box.**** (\[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.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): When true, the specified size will be inclusive of the specified radius. If true, a warning will be produced if the radius is greater-than or equal-to twice the specified size.

### Returns

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