Class EntityCommandBufferSystem
A system that provides Entity
Inherited Members
Namespace: Unity.Entities
Assembly: solution.dll
Syntax
public abstract class EntityCommandBufferSystem : SystemBase
Remarks
Each system that uses the EntityCommandBuffer provided by a command buffer system must call
Create
When you write to a command buffer from a Job, you must add the Job
If you write to a command buffer from a Job that runs in
parallel (and this includes both IJob
Executing the commands in an EntityCommandBuffer invokes the corresponding functions of the
Entity
The default ECS World code creates a Component
Note that unused command buffers systems do not create sync points because there are no commands to execute and thus no structural changes created.
The EntityCommandBufferSystem class is abstract, so you must implement a subclass to create your own
entity command buffer system. However, none of its methods are abstract, so you do not need to implement
your own logic. Typically, you create an EntityCommandBufferSystem subclass to create a named buffer system
for other systems to use and update it at an appropriate place in a custom Component
Fields
Name | Description |
---|---|
m_Pending |
List of command buffers that this system has allocated, which are played back and disposed of when the system updates. |
Properties
Name | Description |
---|---|
Pending |
Methods
Name | Description |
---|---|
Add |
Adds the specified JobHandle to this system's list of dependencies. |
Create |
Creates an Entity |
Create |
Creates a command buffer, sets it up, and appends it to a list of command buffers. |
Create |
Creates a command buffer that allocates from a World's Update Allocator, sets it up, and appends it to a list of command buffers. |
On |
Initializes this command buffer system. |
On |
Destroys this system. Any pending command buffers will be disposed, but their commands will NOT be played back. |
On |
Executes the command buffers in this system in the order they were created. |