Trait bevy_retrograde::core::bevy_extensions::AssetServerExt[][src]

pub trait AssetServerExt {
    fn load_cached<'a, T, P>(&self, path: P) -> Handle<T>
    where
        T: Asset,
        P: Into<AssetPath<'a>>
;
fn remove_from_cache<T>(handle: Handle<T>)
    where
        T: Asset
; }
Expand description

Extension functions for the Bevy [AssetServer]

Required methods

Load an asset and add it to an internal cache, or if it has already been loaded, get the cached asset handle.

This is provided by an extension trait to the Bevy asset server.

Note

If the asset that has previously been cached is being loaded and it has been manually removed from the asset store, the handle returned by this function will point to an un-loaded asset and the asset must be re-loaded with the normal load function.

Remove a handle from the asset cache. It is recommended to do this for any cached assets that are manually removed to prevent the cached handle being returned for a non-existent asset.

This is provided by an extension trait to the Bevy asset server.

Implementations on Foreign Types

Implementors