You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Iterates all component change ticks and clamps any older than [`MAX_CHANGE_AGE`](crate::change_detection::MAX_CHANGE_AGE).
1767
1767
/// This prevents overflow and thus prevents false positives.
1768
1768
///
1769
-
/// **Note:** Does nothing if the [`World`] counter has not been incremented at least [`CHECK_TICK_THRESHOLD`](crate::change_detection::CHECK_TICK_THRESHOLD)
1769
+
/// **Note:** Does nothing if the [`World`] counter has not been incremented at least [`CHECK_TICK_THRESHOLD`]
Copy file name to clipboardExpand all lines: crates/bevy_ecs/src/world/unsafe_world_cell.rs
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -26,14 +26,14 @@ use std::{any::TypeId, cell::UnsafeCell, fmt::Debug, marker::PhantomData};
26
26
/// In rust, having a `&mut World` means that there are absolutely no other references to the safe world alive at the same time,
27
27
/// without exceptions. Not even unsafe code can change this.
28
28
///
29
-
/// But there are situations where careful shared mutable access through a type is possible and safe. For this, rust provides the [`UnsafeCell`](std::cell::UnsafeCell)
29
+
/// But there are situations where careful shared mutable access through a type is possible and safe. For this, rust provides the [`UnsafeCell`]
30
30
/// escape hatch, which allows you to get a `*mut T` from a `&UnsafeCell<T>` and around which safe abstractions can be built.
31
31
///
32
32
/// Access to resources and components can be done uniquely using [`World::resource_mut`] and [`World::entity_mut`], and shared using [`World::resource`] and [`World::entity`].
33
33
/// These methods use lifetimes to check at compile time that no aliasing rules are being broken.
34
34
///
35
35
/// This alone is not enough to implement bevy systems where multiple systems can access *disjoint* parts of the world concurrently. For this, bevy stores all values of
36
-
/// resources and components (and [`ComponentTicks`](crate::component::ComponentTicks)) in [`UnsafeCell`](std::cell::UnsafeCell)s, and carefully validates disjoint access patterns using
36
+
/// resources and components (and [`ComponentTicks`]) in [`UnsafeCell`]s, and carefully validates disjoint access patterns using
37
37
/// APIs like [`System::component_access`](crate::system::System::component_access).
38
38
///
39
39
/// A system then can be executed using [`System::run_unsafe`](crate::system::System::run_unsafe) with a `&World` and use methods with interior mutability to access resource values.
/// Get an untyped pointer to a particular [`Component`](crate::component::Component) on a particular [`Entity`] in the provided [`World`](crate::world::World).
912
+
/// Get an untyped pointer to a particular [`Component`] on a particular [`Entity`] in the provided [`World`].
913
913
///
914
914
/// # Safety
915
915
/// - `location` must refer to an archetype that contains `entity`
@@ -937,7 +937,7 @@ unsafe fn get_component(
937
937
}
938
938
}
939
939
940
-
/// Get an untyped pointer to a particular [`Component`](crate::component::Component) and its [`ComponentTicks`]
940
+
/// Get an untyped pointer to a particular [`Component`] and its [`ComponentTicks`]
941
941
///
942
942
/// # Safety
943
943
/// - `location` must refer to an archetype that contains `entity`
0 commit comments