From aaaf357dbb352232810a02c7bbd0090109eaea53 Mon Sep 17 00:00:00 2001 From: zeroacez Date: Tue, 10 Jan 2023 17:25:44 +0000 Subject: [PATCH] Added docs for ``.apply()``in basic usage of ``systemState`` (#7138) # Objective Fixes #5940 ## Solution Added the suggested comment. Co-authored-by: zeroacez <43633834+zeroacez@users.noreply.github.com> --- crates/bevy_ecs/src/system/function_system.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/bevy_ecs/src/system/function_system.rs b/crates/bevy_ecs/src/system/function_system.rs index f99ae67b15a4a..b781a4d39f43e 100644 --- a/crates/bevy_ecs/src/system/function_system.rs +++ b/crates/bevy_ecs/src/system/function_system.rs @@ -106,6 +106,9 @@ impl SystemMeta { /// // Use system_state.get_mut(&mut world) and unpack your system parameters into variables! /// // system_state.get(&world) provides read-only versions of your system parameters instead. /// let (event_writer, maybe_resource, query) = system_state.get_mut(&mut world); +/// +/// // If you are using [`Commands`], you can choose when you want to apply them to the world. +/// // You need to manually call `.apply(world)` on the [`SystemState`] to apply them. /// ``` /// Caching: /// ```rust