From 821f6fa0dd575d03b67746a7701f34c95e7e544e Mon Sep 17 00:00:00 2001 From: Carter Weinberg Date: Tue, 18 Mar 2025 16:30:49 -0400 Subject: [PATCH] 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. --- crates/bevy_ecs/src/world/deferred_world.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/bevy_ecs/src/world/deferred_world.rs b/crates/bevy_ecs/src/world/deferred_world.rs index 22474a75fe..4332d12163 100644 --- a/crates/bevy_ecs/src/world/deferred_world.rs +++ b/crates/bevy_ecs/src/world/deferred_world.rs @@ -20,6 +20,8 @@ use super::{unsafe_world_cell::UnsafeWorldCell, Mut, World, ON_INSERT, ON_REPLAC /// A [`World`] reference that disallows structural ECS changes. /// This includes initializing resources, registering components or spawning entities. +/// +/// This means that in order to add entities, for example, you will need to use commands instead of the world directly. pub struct DeferredWorld<'w> { // SAFETY: Implementors must not use this reference to make structural changes world: UnsafeWorldCell<'w>,