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
:Format
for loadingA
Variants
Handle(Handle<A>)
From existing handle
File(String, F, F::Options)
From file, (name, format, format options)
Trait Implementations
impl<A: Clone, F: Clone> Clone for AssetPrefab<A, F> where
A: Asset,
F: Format<A>,
F::Options: Clone,
[src]
impl<A: Clone, F: Clone> Clone for AssetPrefab<A, F> where
A: Asset,
F: Format<A>,
F::Options: Clone,
fn clone(&self) -> AssetPrefab<A, F>
[src]
fn clone(&self) -> AssetPrefab<A, F>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
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