Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions crates/bevy_ecs/src/hierarchy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ impl<'w> EntityWorldMut<'w> {
}

/// Spawns the passed bundle and adds it to this entity as a child.
/// Returns &mut [`EntityWorldMut`] for parent.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is called on entity, and spawn the bundle as its child. so if we use the "parent" word here, it would be the parent of the first entity which doesn't make sense

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you think this could be better described?

Copy link
Member

@mockersf mockersf Nov 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe "original entity" would be better than parent there? or "initial entity"?

///
/// For efficient spawning of multiple children, use [`with_children`].
///
Expand Down Expand Up @@ -480,6 +481,7 @@ impl<'a> EntityCommands<'a> {
}

/// Spawns the passed bundle and adds it to this entity as a child.
/// Returns &mut [`EntityCommands`] for parent.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

///
/// For efficient spawning of multiple children, use [`with_children`].
///
Expand Down