# EndSimulationEntityCommandBufferSystem.Singleton

> Call SystemAPI.GetSingleton to get this component for this system, and then call EndSimulationEntityCommandBufferSystem.Singleton.CreateCommandBuffer on this singleton to create an ECB to be played back by this system.

## Definition

* **Type:** Struct
* **Namespace:** [Unity.Entities](/engine/7000.0/script-reference/unity/entities.md)
* **Assembly:** UnityEngine.EntitiesModule
* **Implements:** [IComponentData](/engine/7000.0/script-reference/unity/entities/icomponentdata.md), [IQueryTypeParameter](/engine/7000.0/script-reference/unity/entities/iquerytypeparameter.md), [IECBSingleton](/engine/7000.0/script-reference/unity/entities/iecbsingleton.md)

```csharp
public struct EndSimulationEntityCommandBufferSystem.Singleton : IComponentData, IQueryTypeParameter, IECBSingleton
```

## Remarks

Useful if you want to record entity commands now, but play them back at a later point in the frame, or early in the next frame.

## Methods

| Method                                                                                                                                          | Description                                                                                  |
| ----------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| [CreateCommandBuffer](/engine/7000.0/script-reference/unity/entities/endsimulationentitycommandbuffersystem/singleton/createcommandbuffer.md)   | Create a command buffer for the parent system to play back.                                  |
| [SetAllocator](/engine/7000.0/script-reference/unity/entities/endsimulationentitycommandbuffersystem/singleton/setallocator.md)                 | Set the allocator that command buffers created with this singleton should be allocated with. |
| [SetPendingBufferList](/engine/7000.0/script-reference/unity/entities/endsimulationentitycommandbuffersystem/singleton/setpendingbufferlist.md) | Sets the list of command buffers to play back when this system updates.                      |
