Trait bevy_hierarchy::BuildWorldChildren
source · [−]pub trait BuildWorldChildren {
fn with_children(
&mut self,
spawn_children: impl FnOnce(&mut WorldChildBuilder<'_>)
) -> &mut Self;
fn push_children(&mut self, children: &[Entity]) -> &mut Self;
fn insert_children(
&mut self,
index: usize,
children: &[Entity]
) -> &mut Self;
fn remove_children(&mut self, children: &[Entity]) -> &mut Self;
}
Expand description
Trait that defines adding children to an entity directly through the World
Required Methods
fn with_children(
&mut self,
spawn_children: impl FnOnce(&mut WorldChildBuilder<'_>)
) -> &mut Self
fn with_children(
&mut self,
spawn_children: impl FnOnce(&mut WorldChildBuilder<'_>)
) -> &mut Self
Creates a WorldChildBuilder
with the given children built in the given closure
Pushes children to the back of the builder’s children
Inserts children at the given index