[−][src]Struct amethyst_assets::PrefabLoader
Helper structure for loading prefabs.
The recommended way of using this from States is to use world.exec.
Example
ⓘThis example is not tested
let prefab_handle = world.exec(|loader: PrefabLoader<SomePrefab>| { loader.load("prefab.ron", RonFormat, ()); });
Methods
impl<'a, T> PrefabLoader<'a, T> where
T: Send + Sync + 'static, [src]
T: Send + Sync + 'static,
pub fn load<F, N, P>(
&self,
name: N,
format: F,
progress: P
) -> Handle<Prefab<T>> where
F: Format<<Prefab<T> as Asset>::Data>,
N: Into<String>,
P: Progress, [src]
&self,
name: N,
format: F,
progress: P
) -> Handle<Prefab<T>> where
F: Format<<Prefab<T> as Asset>::Data>,
N: Into<String>,
P: Progress,
Load prefab from source
pub fn load_from_data<P>(
&self,
data: Prefab<T>,
progress: P
) -> Handle<Prefab<T>> where
P: Progress, [src]
&self,
data: Prefab<T>,
progress: P
) -> Handle<Prefab<T>> where
P: Progress,
Load prefab from explicit data
Trait Implementations
impl<'a, T> SystemData<'a> for PrefabLoader<'a, T> where
T: Send + Sync + 'static,
ReadExpect<'a, Loader>: SystemData<'a>,
Read<'a, AssetStorage<Prefab<T>>>: SystemData<'a>, [src]
T: Send + Sync + 'static,
ReadExpect<'a, Loader>: SystemData<'a>,
Read<'a, AssetStorage<Prefab<T>>>: SystemData<'a>,
Auto Trait Implementations
impl<'a, T> Unpin for PrefabLoader<'a, T>
impl<'a, T> Sync for PrefabLoader<'a, T>
impl<'a, T> Send for PrefabLoader<'a, T>
impl<'a, T> !UnwindSafe for PrefabLoader<'a, T>
impl<'a, T> !RefUnwindSafe for PrefabLoader<'a, T>
Blanket Implementations
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Same<T> for T[src]
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>, [src]
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>[src]
fn is_in_subset(&self) -> bool[src]
unsafe fn to_subset_unchecked(&self) -> SS[src]
fn from_subset(element: &SS) -> SP[src]
impl<'a, T> DynamicSystemData<'a> for T where
T: SystemData<'a>, [src]
T: SystemData<'a>,
type Accessor = StaticAccessor<T>
The accessor of the SystemData, which specifies the read and write dependencies and does the fetching. Read more
fn setup(&StaticAccessor<T>, world: &mut World)[src]
fn fetch(&StaticAccessor<T>, world: &'a World) -> T[src]
impl<T> Resource for T where
T: Any + Send + Sync, [src]
T: Any + Send + Sync,
impl<T> Any for T where
T: Any, [src]
T: Any,
fn get_type_id(&self) -> TypeId[src]
impl<T> Event for T where
T: Send + Sync + 'static, [src]
T: Send + Sync + 'static,