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.
This commit is contained in:
parent
5ab0456f61
commit
821f6fa0dd
@ -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>,
|
||||
|
Loading…
Reference in New Issue
Block a user