defer method

void defer(
  1. Entity entity,
  2. void command(
    1. World world,
    2. Entity entity
    )
)

Queues command in the same FIFO as inserts, removals and despawns.

Runs at a safe structural boundary. The callback owns stale-target handling, just like a SceneDashBundle. Used by surface commands that also need to manage parts waiting for a component store.

Implementation

void defer(Entity entity, void Function(World world, Entity entity) command) {
  _push(_opDeferred, entity, command, Object);
}