From 2d30ae437c31d77c14c05cd25a285e2dcd38f53c Mon Sep 17 00:00:00 2001 From: Wuketuke <59253838+Wuketuke@users.noreply.github.com> Date: Tue, 25 Jun 2024 12:27:15 +0000 Subject: [PATCH] =?UTF-8?q?improved=20error=20message=20when=20forgetting?= =?UTF-8?q?=20to=20call=20system=20apply=20function=20=E2=80=A6=20(#13975)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes #13944 I literally just added `Did you forget to call SystemState::apply?` to the error message. I tested it with the code snipped from the Issue and yeah it works --- crates/bevy_ecs/src/world/command_queue.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_ecs/src/world/command_queue.rs b/crates/bevy_ecs/src/world/command_queue.rs index 721248ea85..a682443a46 100644 --- a/crates/bevy_ecs/src/world/command_queue.rs +++ b/crates/bevy_ecs/src/world/command_queue.rs @@ -312,7 +312,7 @@ impl RawCommandQueue { impl Drop for CommandQueue { fn drop(&mut self) { if !self.bytes.is_empty() { - warn!("CommandQueue has un-applied commands being dropped."); + warn!("CommandQueue has un-applied commands being dropped. Did you forget to call SystemState::apply?"); } // SAFETY: A reference is always a valid pointer unsafe { self.get_raw().apply_or_drop_queued(None) };