NiklasEi / bevy_asset_loader

Bevy plugin helping with asset loading and organization
Apache License 2.0
452 stars 53 forks source link

Is it possible to load serializable structs as assets? #141

Closed Aultus-defora closed 1 year ago

Aultus-defora commented 1 year ago

This crate is very handy for assets that exist in Bevy. Is it possible to load serializable structs as assets from files? using .add_plugin(JsonAssetPlugin::<CustomAsset>::new(&[".asset.json"])) .add_collection_to_loading_state::<_, CustomAssetCollection>(GameState::Loading) just freezes the app forever. I guess this would require writting bevy_common_assets + serde support feature(s)...

P.S. the warning that happens is noAssetLoaderfound for the following extensions: levels.json, json. I guess for now I need to create levels.json AssetLoader by hand instead.

Aultus-defora commented 1 year ago

nvm, a typo while using bevy_common_assets was the issue there. The dot was not needed. I'm closing the issue.