Trait bevy::asset::AssetLoader

pub trait AssetLoader: 'static + Send + Sync {
    fn load<'a>(
        &'a self,
        bytes: &'a [u8],
        load_context: &'a mut LoadContext<'_>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a, Global>>; fn extensions(&self) -> &[&str]; }
Expand description

A loader for an asset source.

Types implementing this trait are used by the asset server to load assets into their respective asset storages.

Required Methods§

Processes the asset in an asynchronous closure.

Returns a list of extensions supported by this asset loader, without the preceding dot.

Implementors§