Struct oxygengine_core::ecs::commands::InstantiatePrefab
source · pub struct InstantiatePrefab {
pub name: String,
pub components: HashMap<usize, EntityBuilder>,
/* private fields */
}
Expand description
(template name, add/override components)
Fields§
§name: String
§components: HashMap<usize, EntityBuilder>
Implementations§
source§impl InstantiatePrefab
impl InstantiatePrefab
pub fn new(name: impl ToString) -> Self
pub fn components(self, index: usize, entity_builder: EntityBuilder) -> Self
pub fn components_from_bundle<B>(self, index: usize, bundle: B) -> Selfwhere B: DynamicBundle,
pub fn on_complete<F>(self, f: F) -> Selfwhere F: FnMut(&mut Universe, &[Entity]) + Send + Sync + 'static,
pub fn execute(&mut self, universe: &mut Universe) -> Option<Vec<Entity>>
Trait Implementations§
source§impl UniverseCommand for InstantiatePrefab
impl UniverseCommand for InstantiatePrefab
Auto Trait Implementations§
impl !RefUnwindSafe for InstantiatePrefab
impl Send for InstantiatePrefab
impl Sync for InstantiatePrefab
impl Unpin for InstantiatePrefab
impl !UnwindSafe for InstantiatePrefab
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more