Struct · Ara
Commands
Structural changes (spawn, despawn, add, remove) and cues, buffered and applied by the host at the next sync point in a deterministic order. Systems take it as a ref Commands parameter; behaviours and commands get one from their context.
public readonly struct CommandsMethods
Spawn
public Entity Spawn();Reserves a new entity. The handle is valid immediately (use it in later calls); the entity exists from the sync point on.
Despawn
public void Despawn(Entity entity);Despawns the entity at the sync point.
Add
public void Add<T>(Entity entity, in T value) where T : IComponent<T>;Adds (or replaces) a component at the sync point.
Remove
public void Remove<T>(Entity entity) where T : IComponent<T>;Removes a component at the sync point.
Cue
public void Cue<T>(in T cue) where T : unmanaged, ICue<T>;Emits a presentation cue (sound, VFX). Cues never change simulation state.