pub trait DynamicAsset: Debug + Send + Sync {
    // Required methods
    fn load(&self, asset_server: &AssetServer) -> Vec<UntypedHandle>;
    fn build(&self, world: &mut World) -> Result<DynamicAssetType, Error>;
}
Expand description

Any type implementing this trait can be assigned to asset keys as part of a dynamic asset collection.

Required Methods§

source

fn load(&self, asset_server: &AssetServer) -> Vec<UntypedHandle>

Return handles to all required asset paths

source

fn build(&self, world: &mut World) -> Result<DynamicAssetType, Error>

Return the handle(s) defining this asset

Implementors§