Enum amethyst_assets::AssetPrefab [−][src]
pub enum AssetPrefab<A, F> where
A: Asset,
F: Format<A>, { Handle(Handle<A>), File(String, F, F::Options), }
Convenience PrefabData for loading assets of type A using Format F.
Will add a Handle<A> to the Entity
Type parameters:
A:Asset,F:Formatfor loadingA
Variants
Handle(Handle<A>)From existing handle
File(String, F, F::Options)From file, (name, format, format options)
Trait Implementations
impl<'a, A, F> PrefabData<'a> for AssetPrefab<A, F> where
A: Asset,
F: Format<A> + Clone,
F::Options: Clone, [src]
impl<'a, A, F> PrefabData<'a> for AssetPrefab<A, F> where
A: Asset,
F: Format<A> + Clone,
F::Options: Clone, type SystemData = (ReadExpect<'a, Loader>, WriteStorage<'a, Handle<A>>, Read<'a, AssetStorage<A>>)
SystemData needed to perform the load
type Result = Handle<A>
The result type returned by the load operation
fn load_prefab(
&self,
entity: Entity,
system_data: &mut Self::SystemData,
_: &[Entity]
) -> Result<Handle<A>, PrefabError>[src]
fn load_prefab(
&self,
entity: Entity,
system_data: &mut Self::SystemData,
_: &[Entity]
) -> Result<Handle<A>, PrefabError>Load the data for this prefab onto the given Entity Read more
fn trigger_sub_loading(
&mut self,
progress: &mut ProgressCounter,
system_data: &mut Self::SystemData
) -> Result<bool, PrefabError>[src]
fn trigger_sub_loading(
&mut self,
progress: &mut ProgressCounter,
system_data: &mut Self::SystemData
) -> Result<bool, PrefabError>Trigger asset loading for any sub assets. Read more