NiklasEi / bevy_asset_loader

Bevy plugin helping with asset loading and organization
Apache License 2.0
481 stars 52 forks source link

May key type for the label of the asset #202

Closed NiklasEi closed 5 months ago

NiklasEi commented 7 months ago
#[derive(AssetCollection, Resource)]
struct AudioAssets {
    #[asset(paths("animated/Fox.glb#Animation0"), collection(mapped, typed))]
    fox_animations: HashMap<AssetLabel, Handle<AnimationClip>>,
}

Should allow access via

asset.fox_animations.get("Animation0");
NiklasEi commented 5 months ago

Completed in #203