Property PostUpdateCommands
PostUpdateCommands
This system's EntityCommandBuffer.
Declaration
public EntityCommandBuffer PostUpdateCommands { get; }
Property Value
Type | Description |
---|---|
EntityCommandBuffer | A queue of entity-related commands to playback after the system's update function finishes. |
Remarks
When iterating over a collection of entities with Entities, the system prohibits structural changes that would invalidate that collection. Such changes include creating and destroying entities, adding or removing components, and changing the value of shared components.
Instead, add structural change commands to this PostUpdateCommands command buffer. The system executes commands added to this command buffer in order after this system's OnUpdate() function returns. PostUpdateCommands are created with a PlaybackPolicy.SinglePlayback and RecordingMode.Managed.