# EntityCommandBuffer

> Creates a new command buffer.

## Definition

* **Type:** Constructor
* **Namespace:** [Unity.Entities](/engine/7000.0/script-reference/unity/entities.md)
* **Assembly:** UnityEngine.EntitiesModule

## EntityCommandBuffer(AllocatorHandle)

Creates a new command buffer.

```csharp
public EntityCommandBuffer(AllocatorManager.AllocatorHandle allocator)
```

### Parameters

**** (\[AllocatorHandle]\(/engine/7000.0/script-reference/unity/collections/allocatormanager/allocatorhandle)): Memory allocator to use for chunks and data

## EntityCommandBuffer(Allocator, PlaybackPolicy)

Creates a new command buffer.

> **Warning:**
>
> **Removed.** Creating an ECB with a PlaybackPolicy is obsolete. This will be removed in a future version.

```csharp
public EntityCommandBuffer(Allocator label, PlaybackPolicy playbackPolicy)
```

### Parameters

**** (\[Allocator]\(/engine/7000.0/script-reference/unity/collections/allocator)): Memory allocator to use for chunks and data**** (\[PlaybackPolicy]\(/engine/7000.0/script-reference/unity/entities/playbackpolicy)): Specifies if the EntityCommandBuffer can be played a single time or more than once.

## EntityCommandBuffer(AllocatorHandle, PlaybackPolicy)

Creates a new command buffer.

> **Warning:**
>
> **Removed.** Creating an ECB with a PlaybackPolicy is obsolete. This will be removed in a future version.

```csharp
public EntityCommandBuffer(AllocatorManager.AllocatorHandle allocator, PlaybackPolicy playbackPolicy)
```

### Parameters

**** (\[AllocatorHandle]\(/engine/7000.0/script-reference/unity/collections/allocatormanager/allocatorhandle)): Memory allocator to use for chunks and data**** (\[PlaybackPolicy]\(/engine/7000.0/script-reference/unity/entities/playbackpolicy)): Specifies if the EntityCommandBuffer can be played a single time or more than once.
