pub trait SpawnOnce {
    type Output: Bundle;

    // Required method
    fn spawn_once(self, world: &World, entity: Entity) -> Self::Output;
}
Expand description

Represents a type which spawns an Entity exactly once.

Usage

The output of a spawn is a Bundle which is inserted into the given spawned Entity.

By default, all bundles implement this trait.

Required Associated Types§

Required Methods§

source

fn spawn_once(self, world: &World, entity: Entity) -> Self::Output

Implementors§

source§

impl<T: Bundle> SpawnOnce for T

§

type Output = T