Method CreateCommandBuffer
CreateCommandBuffer()
Creates an Entity
Declaration
public EntityCommandBuffer CreateCommandBuffer()
Returns
Type | Description |
---|---|
Entity |
A command buffer that will be executed by this system. |
Remarks
This buffer system executes its list of command buffers during its On
If you write to a command buffer in a Job, you must add the
Job as a dependency of this system by calling Add
If you write to a command buffer from a parallel Job, such as IJob
CreateCommandBuffer(ref UnsafeList<EntityCommandBuffer>, AllocatorHandle, WorldUnmanaged)
Creates a command buffer, sets it up, and appends it to a list of command buffers.
Declaration
public static EntityCommandBuffer CreateCommandBuffer(ref UnsafeList<EntityCommandBuffer> pendingBuffers, AllocatorManager.AllocatorHandle allocator, WorldUnmanaged world)
Parameters
Type | Name | Description |
---|---|---|
Unsafe |
pendingBuffers | The list of command buffers to append to |
Allocator |
allocator | The allocator to allocate from, when building the command buffer |
World |
world | The world that this command buffer buffers changes for |
Returns
Type | Description |
---|---|
Entity |
Returns the command buffer |
CreateCommandBuffer(ref UnsafeList<EntityCommandBuffer>, WorldUnmanaged)
Creates a command buffer that allocates from a World's Update Allocator, sets it up, and appends it to a list of command buffers.
Declaration
public static EntityCommandBuffer CreateCommandBuffer(ref UnsafeList<EntityCommandBuffer> pendingBuffers, WorldUnmanaged world)
Parameters
Type | Name | Description |
---|---|---|
Unsafe |
pendingBuffers | The list of command buffers to append to |
World |
world | The world that this command buffer buffers changes for |
Returns
Type | Description |
---|---|
Entity |
Returns the command buffer |