diff --git a/crates/bevy_ecs/src/system/system_registry.rs b/crates/bevy_ecs/src/system/system_registry.rs index c04ff35b7c..7057b6fcae 100644 --- a/crates/bevy_ecs/src/system/system_registry.rs +++ b/crates/bevy_ecs/src/system/system_registry.rs @@ -145,7 +145,6 @@ impl World { /// # Limitations /// /// - Stored systems cannot be recursive, they cannot call themselves through [`Commands::run_system`](crate::system::Commands). - /// - Exclusive systems cannot be used. /// /// # Examples /// @@ -239,7 +238,6 @@ impl World { /// # Limitations /// /// - Stored systems cannot be recursive, they cannot call themselves through [`Commands::run_system`](crate::system::Commands). - /// - Exclusive systems cannot be used. /// /// # Examples /// @@ -505,6 +503,17 @@ mod tests { assert_eq!(output, NonCopy(3)); } + #[test] + fn exclusive_system() { + let mut world = World::new(); + let exclusive_system_id = world.register_system(|world: &mut World| { + world.spawn_empty(); + }); + let entity_count = world.entities.len(); + let _ = world.run_system(exclusive_system_id); + assert_eq!(world.entities.len(), entity_count + 1); + } + #[test] fn nested_systems() { use crate::system::SystemId;