[][src]Trait amethyst_assets::Asset

pub trait Asset: Send + Sync + 'static {
    type Data: Send + Sync + 'static;
    type HandleStorage: UnprotectedStorage<Handle<Self>> + Send + Sync;

    const NAME: &'static str;
}

One of the three core traits of this crate.

You want to implement this for every type of asset like

and so on. Now, an asset may be available in different formats. That's why we have the Data associated type here. You can specify an intermediate format here, like the vertex data for a mesh or the samples for audio data.

This data is then generated by the Format trait.

Associated Types

type Data: Send + Sync + 'static

The Data type the asset can be created from.

type HandleStorage: UnprotectedStorage<Handle<Self>> + Send + Sync

The ECS storage type to be used. You'll want to use DenseVecStorage in most cases.

Loading content...

Associated Constants

const NAME: &'static str

An identifier for this asset used for debugging.

Loading content...

Implementors

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

type Data = Self

type HandleStorage = FlaggedStorage<Handle<Self>, DenseVecStorage<Handle<Self>>>

Loading content...