pub const DESPAWN: FunctionDescriptor;Expand description
Schedules an entity for removal when the current initializer, callback, or action completes.
The entity must exist. Removal is deferred until the enclosing initializer, callback, or action completes so checked work sees a consistent world.
§Signature
func despawn(entity: Entity) -> Unit§Schedule removal
The current value remains printable while removal is pending.
let entity = spawn(Vec3 {});
despawn(entity);
print(entity);