pub trait Spawn {
type Output: Bundle;
// Required method
fn spawn(&self, world: &World, entity: Entity) -> Self::Output;
}
Expand description
Represents a type which spawns an Entity.
The output of a spawn is a Bundle which is inserted into the given spawned Entity.
By default, anything which implements SpawnOnce and Clone also implements this trait.
This includes bundles which can be cloned.