mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 04:33:37 +00:00
Fix ImageLoader
not being initialized with webp
or pnm
features (#12355)
# Objective Fixes #12353 When only `webp` was selected, `ImageLoader` would not be initialized. That is, users using `default-features = false` would need to add `png` or `bmp` or something in addition to `webp` in order to use `webp`. This was also the case for `pnm`. ## Solution Add `webp` and `pnm` to the list of features that trigger the initialization of `ImageLoader`.
This commit is contained in:
parent
2683dfeee8
commit
0767e62112
1 changed files with 4 additions and 0 deletions
|
@ -118,6 +118,8 @@ impl Plugin for ImagePlugin {
|
|||
feature = "bmp",
|
||||
feature = "basis-universal",
|
||||
feature = "ktx2",
|
||||
feature = "webp",
|
||||
feature = "pnm"
|
||||
))]
|
||||
app.preregister_asset_loader::<ImageLoader>(IMG_FILE_EXTENSIONS);
|
||||
}
|
||||
|
@ -131,6 +133,8 @@ impl Plugin for ImagePlugin {
|
|||
feature = "bmp",
|
||||
feature = "basis-universal",
|
||||
feature = "ktx2",
|
||||
feature = "webp",
|
||||
feature = "pnm"
|
||||
))]
|
||||
{
|
||||
app.init_asset_loader::<ImageLoader>();
|
||||
|
|
Loading…
Reference in a new issue