diff --git a/crates/bevy_ecs/src/system/commands/command_queue.rs b/crates/bevy_ecs/src/system/commands/command_queue.rs index bfc846347cb788..4880684f7b7d95 100644 --- a/crates/bevy_ecs/src/system/commands/command_queue.rs +++ b/crates/bevy_ecs/src/system/commands/command_queue.rs @@ -73,6 +73,9 @@ impl CommandQueue { /// This clears the queue. #[inline] pub fn apply(&mut self, world: &mut World) { + // flush previouly queued entities + world.flush(); + // SAFE: In the iteration below, `meta.func` will safely consume and drop each pushed command. // This operation is so that we can reuse the bytes `Vec`'s internal storage and prevent // unnecessary allocations.