pub trait ComponentFactory: Send + Sync {
// Required methods
fn insert(&self, world: &mut World, entity: Entity, value: &Value);
fn insert_lazy(&self, lazy: &LazyUpdate, entity: Entity, value: &Value);
}Expand description
All components must have a factory implementing this trait to be able created from a scene config
Required Methods§
Sourcefn insert(&self, world: &mut World, entity: Entity, value: &Value)
fn insert(&self, world: &mut World, entity: Entity, value: &Value)
Build a component from value and insert it into entity of world
Sourcefn insert_lazy(&self, lazy: &LazyUpdate, entity: Entity, value: &Value)
fn insert_lazy(&self, lazy: &LazyUpdate, entity: Entity, value: &Value)
Build a component from value and lazily insert it into entity of world