Struct EntityCommandBuffer
A thread-safe command buffer that can buffer commands that affect entities and components for later playback.
Inherited Members
System.ValueType.Equals(System.Object)
System.ValueType.GetHashCode()
System.ValueType.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
Syntax
public struct EntityCommandBuffer
Constructors
EntityCommandBuffer(Allocator)
Creates a new command buffer.
Declaration
public EntityCommandBuffer(Allocator label)
Parameters
| Type |
Name |
Description |
| Allocator |
label |
Memory allocator to use for chunks and data
|
Properties
MinimumChunkSize
Allows controlling the size of chunks allocated from the temp job allocator to back the command buffer.
Declaration
public int MinimumChunkSize { get; set; }
Property Value
| Type |
Description |
| System.Int32 |
|
ShouldPlayback
Controls whether this command buffer should play back.
Declaration
public bool ShouldPlayback { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
Methods
AddComponent<T>(T)
Declaration
public void AddComponent<T>(T component)where T : struct, IComponentData
Parameters
| Type |
Name |
Description |
| T |
component |
|
Type Parameters
AddComponent<T>(Entity, T)
Declaration
public void AddComponent<T>(Entity e, T component)where T : struct, IComponentData
Parameters
| Type |
Name |
Description |
| Entity |
e |
|
| T |
component |
|
Type Parameters
AddSharedComponent<T>(T)
Declaration
public void AddSharedComponent<T>(T component)where T : struct, ISharedComponentData
Parameters
| Type |
Name |
Description |
| T |
component |
|
Type Parameters
AddSharedComponent<T>(Entity, T)
Declaration
public void AddSharedComponent<T>(Entity e, T component)where T : struct, ISharedComponentData
Parameters
| Type |
Name |
Description |
| Entity |
e |
|
| T |
component |
|
Type Parameters
CreateEntity()
Declaration
public void CreateEntity()
CreateEntity(EntityArchetype)
Declaration
public void CreateEntity(EntityArchetype archetype)
Parameters
DestroyEntity(Entity)
Declaration
public void DestroyEntity(Entity e)
Parameters
| Type |
Name |
Description |
| Entity |
e |
|
Playback(EntityManager)
Play back all recorded operations against an entity manager.
Declaration
public void Playback(EntityManager mgr)
Parameters
| Type |
Name |
Description |
| EntityManager |
mgr |
The entity manager that will receive the operations
|
RemoveComponent<T>(Entity)
Declaration
public void RemoveComponent<T>(Entity e)
Parameters
| Type |
Name |
Description |
| Entity |
e |
|
Type Parameters
SetComponent<T>(T)
Declaration
public void SetComponent<T>(T component)where T : struct, IComponentData
Parameters
| Type |
Name |
Description |
| T |
component |
|
Type Parameters
SetComponent<T>(Entity, T)
Declaration
public void SetComponent<T>(Entity e, T component)where T : struct, IComponentData
Parameters
| Type |
Name |
Description |
| Entity |
e |
|
| T |
component |
|
Type Parameters
SetSharedComponent<T>(T)
Declaration
public void SetSharedComponent<T>(T component)where T : struct, ISharedComponentData
Parameters
| Type |
Name |
Description |
| T |
component |
|
Type Parameters
SetSharedComponent<T>(Entity, T)
Declaration
public void SetSharedComponent<T>(Entity e, T component)where T : struct, ISharedComponentData
Parameters
| Type |
Name |
Description |
| Entity |
e |
|
| T |
component |
|
Type Parameters