Trait zengine_asset::AssetExtension
source · [−]pub trait AssetExtension {
fn add_asset<T: Asset>(&mut self) -> &mut Self;
fn add_asset_loader<T: AssetLoader>(&mut self, loader: T) -> &mut Self;
}
Expand description
Add functionalities to add new Asset and new AssetLoader to the engine
Required Methods
sourcefn add_asset<T: Asset>(&mut self) -> &mut Self
fn add_asset<T: Asset>(&mut self) -> &mut Self
Add an Asset to the engine
This method create the Assets storage for the target Asset
register the Asset
type to the AssetManager
and add a system to update the Assets
storage when and Asset
is loaded or unloaded
sourcefn add_asset_loader<T: AssetLoader>(&mut self, loader: T) -> &mut Self
fn add_asset_loader<T: AssetLoader>(&mut self, loader: T) -> &mut Self
Add an AssetLoader to the engine
This method register an asset loader to the AssetManager