Trait bevy::asset::DirectAssetAccessExt

pub trait DirectAssetAccessExt {
    // Required methods
    fn add_asset<A>(&mut self, asset: impl Into<A>) -> Handle<A>
       where A: Asset;
    fn load_asset<'a, A>(&self, path: impl Into<AssetPath<'a>>) -> Handle<A>
       where A: Asset;
    fn load_asset_with_settings<'a, A, S>(
        &self,
        path: impl Into<AssetPath<'a>>,
        settings: impl Fn(&mut S) + Send + Sync + 'static,
    ) -> Handle<A>
       where A: Asset,
             S: Settings;
}

Required Methods§

fn add_asset<A>(&mut self, asset: impl Into<A>) -> Handle<A>
where A: Asset,

Insert an asset similarly to Assets::add.

fn load_asset<'a, A>(&self, path: impl Into<AssetPath<'a>>) -> Handle<A>
where A: Asset,

Load an asset similarly to AssetServer::load.

fn load_asset_with_settings<'a, A, S>( &self, path: impl Into<AssetPath<'a>>, settings: impl Fn(&mut S) + Send + Sync + 'static, ) -> Handle<A>
where A: Asset, S: Settings,

Load an asset with settings, similarly to AssetServer::load_with_settings.

Object Safety§

This trait is not object safe.

Implementors§