Skip to content

Commit cbd2243

Browse files
Note limitations
1 parent f633012 commit cbd2243

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

crates/bevy_ecs/src/system/system_registry.rs

+6-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ use crate::world::{Mut, World};
1414
///
1515
/// Any [`Commands`](crate::system::Commands) generated by these systems (but not other systems), will immediately be applied.
1616
///
17-
/// Stored systems cannot be chained: they can neither have an [`In`](crate::system::In) nor return any values.
17+
/// # Limitations
18+
///
19+
/// - stored systems cannot be chained: they can neither have an [`In`](crate::system::In) nor return any values.
20+
/// - stored systems cannot recurse: they cannot run other systems via the [`SystemRegistry`] methods on `World` or `Commands`.
21+
/// - exclusive systems cannot be used.
1822
///
1923
/// # Examples
2024
///
@@ -55,10 +59,6 @@ use crate::world::{Mut, World};
5559
/// for _ in 0..7 {
5660
/// commands.spawn().insert(Marker);
5761
/// }
58-
///
59-
/// // You can even run systems via commands,
60-
/// // which will take effect the next time commands are applied
61-
/// commands.run_system(assert_7_spawned)
6262
/// }
6363
///
6464
/// fn assert_7_spawned(query: Query<(), Added<Marker>>){
@@ -67,6 +67,7 @@ use crate::world::{Mut, World};
6767
/// }
6868
///
6969
/// world.run_system(spawn_7_entities);
70+
/// world.run_system(assert_7_spawned);
7071
/// ```
7172
///
7273
/// ```rust

0 commit comments

Comments
 (0)