Struct amethyst_assets::PrefabLoader[][src]

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]

Load prefab from source

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]

Sets up the system data for fetching it from the Resources.

Fetches the system data from Resources. Note that this is only specified for one concrete lifetime 'a, you need to implement the SystemData trait for every possible lifetime. Read more

Important traits for Vec<u8>

Returns all read dependencies as fetched from Self::fetch. Read more

Important traits for Vec<u8>

Returns all write dependencies as fetched from Self::fetch. Read more

Auto Trait Implementations

impl<'a, T> Send for PrefabLoader<'a, T>

impl<'a, T> Sync for PrefabLoader<'a, T>