forked from bevyengine/bevy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use cfg attribute to filter supported extensions (bevyengine#2297)
When implementing `AssetLoader ` you need to specify which File extensions are supported by that loader. Currently, Bevy always says it supports extensions that actually require activating a Feature beforehand. This PR adds cf attributes, so Bevy only tries to load those Extensions whose Features were activated. This prevents Bevy from Panicking and reports such a warning: ``` Jun 02 23:05:57.139 WARN bevy_asset::asset_server: no `AssetLoader` found for the following extension: ogg ``` This also fixes the Bug, that the `png Feature had to be activated even if you wanted to load a different image format. Fixes bevyengine#640
- Loading branch information
1 parent
c4b8210
commit 4fed2ee
Showing
4 changed files
with
41 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters