diff --git a/crates/bevy_hierarchy/src/child_builder.rs b/crates/bevy_hierarchy/src/child_builder.rs index 6b949119cd111..90ea42af39e4a 100644 --- a/crates/bevy_hierarchy/src/child_builder.rs +++ b/crates/bevy_hierarchy/src/child_builder.rs @@ -585,7 +585,8 @@ impl BuildChildren for EntityWorldMut<'_> { } fn with_child(&mut self, bundle: B) -> &mut Self { - let child = self.world_scope(|world| world.spawn(bundle).id()); + let parent = self.id(); + let child = self.world_scope(|world| world.spawn((bundle, Parent(parent))).id()); if let Some(mut children_component) = self.get_mut::() { children_component.0.retain(|value| child != *value); children_component.0.push(child);