# ECBExtensionMethods

> Extension methods for EntityCommandBufferSystem.

## Definition

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

```csharp
public static class ECBExtensionMethods
```

## Static Methods

| Method                                                                                                       | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [RegisterSingleton](/engine/7000.0/script-reference/unity/entities/ecbextensionmethods/registersingleton.md) | Every unmanaged Singleton that implements IECBSingleton must be registered by this function, at the end of its owner's EntityCommandBufferSystem.OnCreate method, in order to prepare the Singleton with the unmanaged data necessary for it to work from unmanaged code, without holding a managed reference to the EntityCommandBufferSystem. This Singleton component will be added to the system entity for this EntityCommandBufferSystem derived type. |
