Closed favilo closed 3 months ago
I am using this crate in conjunction with bevy_asset_loader, and I would like to have a stronger type than just copying the &str around.
bevy_asset_loader
It would be really nice if we could just do something like:
#[derive(AssetCollection, Resource)] pub struct TextureAssets { #[asset(path = "textures/icon.png")] pub icon: Handle<Image>, }
And then use it just like this:
let textures = cx.use_resource::<TextureAssets>(); Icon::new(textures.icon.clone())
I am using this crate in conjunction with
bevy_asset_loader
, and I would like to have a stronger type than just copying the &str around.It would be really nice if we could just do something like:
And then use it just like this: