Skip to content

Commit 821f6fa

Browse files
authored
Small Docs PR for Deferred Worlds (#18384)
# Objective I was looking over a PR yesterday, and got confused by the docs on deferred world. I thought I would add a little more detail to the struct in order to clarify it a little. ## Solution Document some more about deferred worlds.
1 parent 5ab0456 commit 821f6fa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crates/bevy_ecs/src/world/deferred_world.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ use super::{unsafe_world_cell::UnsafeWorldCell, Mut, World, ON_INSERT, ON_REPLAC
2020

2121
/// A [`World`] reference that disallows structural ECS changes.
2222
/// This includes initializing resources, registering components or spawning entities.
23+
///
24+
/// This means that in order to add entities, for example, you will need to use commands instead of the world directly.
2325
pub struct DeferredWorld<'w> {
2426
// SAFETY: Implementors must not use this reference to make structural changes
2527
world: UnsafeWorldCell<'w>,

0 commit comments

Comments
 (0)