Struct EntityCommandBuffer
A thread-safe command buffer that can buffer commands that affect entities and components for later playback.
Namespace: Unity.Entities
Syntax
public struct EntityCommandBuffer : IDisposable
Constructors
Name | Description |
---|---|
EntityCommandBuffer(Allocator) | Creates a new command buffer. |
EntityCommandBuffer(Allocator, PlaybackPolicy) | Creates a new command buffer. |
Properties
Name | Description |
---|---|
IsCreated | |
MinimumChunkSize | Allows controlling the size of chunks allocated from the temp job allocator to back the command buffer. |
ShouldPlayback | Controls whether this command buffer should play back. |
Methods
Name | Description |
---|---|
AddBuffer<T>(Entity) | |
AddComponent(Entity, ComponentType) | |
AddComponent(Entity, ComponentTypes) | Records a command to add one or more components to an entity. |
AddComponent(EntityQuery, ComponentType) | Records a command to add a component to all entities matching a query. |
AddComponent(EntityQuery, ComponentTypes) | Records a command to add one or more components to all entities matching a query. |
AddComponent<T>(Entity) | |
AddComponent<T>(Entity, T) | |
AddComponent<T>(EntityQuery) | Records a command to add a component to all entities matching a query. |
AddComponentForEntityQuery(EntityQuery, ComponentType) | Records a command to add a component to all entities matching a query. |
AddComponentForEntityQuery(EntityQuery, ComponentTypes) | Records a command to add multiple components to all entities matching a query. |
AddComponentForEntityQuery<T>(EntityQuery) | Records a command to add a component to all entities matching a query. |
AddComponentForEntityQuery<T>(EntityQuery, T) | Records a command to add a component to all entities matching a query. Also sets the value of this new component on all the matching entities. |
AddSharedComponent<T>(Entity, T) | |
AddSharedComponent<T>(EntityQuery, T) | Records a command to add a shared component to all entities matching a query. |
AppendToBuffer<T>(Entity, T) | Appends a single element to the end of a dynamic buffer component. |
AsParallelWriter() | |
CreateEntity() | Create an entity with no components. |
CreateEntity(EntityArchetype) | Create an entity with specified archetype. |
DestroyEntitiesForEntityQuery(EntityQuery) | Records a command to destroy all entities matching a query. |
DestroyEntity(Entity) | |
DestroyEntity(EntityQuery) | Records a command to destroy all entities matching a query. |
Dispose() | |
Instantiate(Entity) | |
Playback(EntityManager) | Play back all recorded operations against an entity manager. |
Playback(ExclusiveEntityTransaction) | Play back all recorded operations with an exclusive entity transaction. BeginExclusiveEntityTransaction(). |
RemoveComponent(Entity, ComponentType) | |
RemoveComponent(Entity, ComponentTypes) | Records a command to remove one or more components from an entity. |
RemoveComponent(EntityQuery, ComponentType) | Records a command to remove a component from all entities matching a query. |
RemoveComponent(EntityQuery, ComponentTypes) | Records a command to remove one or more components from all entities matching a query. |
RemoveComponent<T>(Entity) | |
RemoveComponent<T>(EntityQuery) | Records a command to remove a component from all entities matching a query. |
RemoveComponentForEntityQuery(EntityQuery, ComponentType) | Records a command to remove a component from all entities matching a query. |
RemoveComponentForEntityQuery(EntityQuery, ComponentTypes) | Records a command to remove multiple components from all entities matching a query. |
RemoveComponentForEntityQuery<T>(EntityQuery) | Records a command to remove a component from all entities matching a query. |
SetBuffer<T>(Entity) | |
SetComponent<T>(Entity, T) | |
SetSharedComponent<T>(Entity, T) |