Trait flat_commands::FlatCommands
source · [−]pub trait FlatCommands<'w, 's> {
fn root<'a>(&'a mut self, entity: Entity) -> RootCommands<'w, 's, 'a>;
fn spawn_root<B>(&mut self, bundle: B) -> RootCommands<'w, 's, '_>
where
B: Bundle;
fn spawn_empty_root(&mut self) -> RootCommands<'w, 's, '_>;
}Required Methods
fn root<'a>(&'a mut self, entity: Entity) -> RootCommands<'w, 's, 'a>
fn root<'a>(&'a mut self, entity: Entity) -> RootCommands<'w, 's, 'a>
Set an existing entity as the root entity of the hierarchy
fn spawn_root<B>(&mut self, bundle: B) -> RootCommands<'w, 's, '_> where
B: Bundle,
fn spawn_root<B>(&mut self, bundle: B) -> RootCommands<'w, 's, '_> where
B: Bundle,
Create a new entity with components from bundle and make it the root of the hierarchy
fn spawn_empty_root(&mut self) -> RootCommands<'w, 's, '_>
fn spawn_empty_root(&mut self) -> RootCommands<'w, 's, '_>
Spawn an empty entity make it the root of the hierarchy