Skip to content

Commit 1ed2673

Browse files
Cross-links to related functionality
1 parent 2590fd0 commit 1ed2673

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

crates/bevy_ecs/src/system/function_system.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ impl SystemMeta {
6363
/// Borrow-checking is handled for you, allowing you to mutably acccess multiple compatible system parameters at once,
6464
/// and arbitrary system parameters (like [`EventWriter`](crate::event::EventWriter)) can be conveniently fetched.
6565
///
66+
/// For an alternative approach to split mutable access to the world, see [`World::resource_scope`].
67+
///
6668
/// # Example
6769
/// ```rust
6870
/// use bevy::ecs::system::SystemState;

crates/bevy_ecs/src/world/mod.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ pub use identifier::WorldId;
3434
/// component type. Entity components can be created, updated, removed, and queried using a given
3535
/// [World].
3636
///
37+
/// For complex access patterns involving [`SystemParam`](crate::system::SystemParam),
38+
/// consider using [`SystemState`](crate::system::SystemState).
39+
///
40+
/// For split mutable access to the [`World`], use [`World::resource_scope`] or
41+
/// [`SystemState`](crate::system::SystemState).
42+
///
3743
/// # Resources
3844
///
3945
/// Worlds can also store *resources*, which are unique instances of a given type that don't
@@ -926,9 +932,13 @@ impl World {
926932
}
927933
}
928934

929-
/// Temporarily removes the requested resource from this [World], then re-adds it before
935+
/// Temporarily removes the requested resource from this [`World`], then re-adds it before
930936
/// returning. This enables safe mutable access to a resource while still providing mutable
931937
/// world access
938+
///
939+
/// For more complex access patterns, consider using [`SystemState`](crate::system::SystemState).
940+
///
941+
/// # Example
932942
/// ```
933943
/// use bevy_ecs::{component::Component, world::{World, Mut}};
934944
/// #[derive(Component)]

0 commit comments

Comments
 (0)