NiklasEi / bevy_asset_loader

Bevy plugin helping with asset loading and organization
Apache License 2.0
489 stars 56 forks source link

Loading ColorMaterial #13

Closed Sheepyhead closed 3 years ago

Sheepyhead commented 3 years ago

Hey there, I love this crate! I ran into an issue though, I want to load ColorMaterial assets to use with GUI components, but it seems like if I add them like I add Textures and Fonts and so on, they fail to load. I don't get any warning messages or anything, but they don't display, and inspecting them in bevy_egui_inspector yields an error handle. Is this not a feature in the crate?

NiklasEi commented 3 years ago

ColorMaterial assets are not directly loaded from a file. It needs a little bit of extra logic to load the file and then add the ColorMaterial to the bevy internal asset collection (which is currently not implemented). I plan on supporting that though, just like I already support it for TextureAtlas assets. Probably there will be a marker attribute like #[asset(color_material)].

Sheepyhead commented 3 years ago

Alright I'm glad to know it's not just me doing something weird! I'll write a little workaround system for now, looking forward to an update :)

NiklasEi commented 3 years ago

Since I am planning to add support, I'll leave this issue open until it's done.