[][src]Struct amethyst_assets::PrefabLoader

pub struct PrefabLoader<'a, T> where
    T: Send + Sync + 'static, 
{ /* fields omitted */ }

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]

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]

Load prefab from source

pub fn load_from_data<P>(
    &self,
    data: Prefab<T>,
    progress: P
) -> Handle<Prefab<T>> where
    P: Progress
[src]

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]

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]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

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]

impl<'a, T> DynamicSystemData<'a> for T where
    T: SystemData<'a>, 
[src]

type Accessor = StaticAccessor<T>

The accessor of the SystemData, which specifies the read and write dependencies and does the fetching. Read more

impl<T> Resource for T where
    T: Any + Send + Sync
[src]

impl<T> Any for T where
    T: Any
[src]

impl<T> Event for T where
    T: Send + Sync + 'static, 
[src]

impl<T> Erased for T[src]