pub trait FlatCommands<'w, 's> {
// Required methods
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§
Sourcefn 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
Sourcefn 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
Sourcefn 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
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.