# CreateChain

> Create a Chain attached to this body.

## Definition

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

## CreateChain(ChainGeometry, PhysicsChainDefinition)

Create a Chain attached to this body.

```csharp
public PhysicsChain CreateChain(ChainGeometry geometry, PhysicsChainDefinition definition)
```

### Parameters

**** (\[ChainGeometry]\(/engine/6000.6/script-reference/unity/u2d/physics/chaingeometry)): The geometry to use.**** (\[PhysicsChainDefinition]\(/engine/6000.6/script-reference/unity/u2d/physics/physicschaindefinition)): The chain definition to use.

### Returns

| Type                                                                              | Description        |
| --------------------------------------------------------------------------------- | ------------------ |
| [PhysicsChain](/engine/6000.6/script-reference/unity/u2d/physics/physicschain.md) | The created chain. |

## CreateChain(ReadOnlySpan\<Vector2>, PhysicsChainDefinition)

Create a Chain of multiple shapes attached to this body.

```csharp
public PhysicsChain CreateChain(ReadOnlySpan<Vector2> vertices, PhysicsChainDefinition definition)
```

### Parameters

**** (\[ReadOnlySpan\<Vector2>]\(https\://learn.microsoft.com/dotnet/api/system.readonlyspan-1)): The vertices that will create the ChainSegment shapes.**** (\[PhysicsChainDefinition]\(/engine/6000.6/script-reference/unity/u2d/physics/physicschaindefinition)): The shape definition to use.

### Returns

| Type                                                                              | Description        |
| --------------------------------------------------------------------------------- | ------------------ |
| [PhysicsChain](/engine/6000.6/script-reference/unity/u2d/physics/physicschain.md) | The created chain. |
