-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adjust bevy_asset::AssetMode::Processed
to take an Option<bool>
th…
#10481
base: main
Are you sure you want to change the base?
Adjust bevy_asset::AssetMode::Processed
to take an Option<bool>
th…
#10481
Conversation
…at if `None` will default to whether the `asset_processor` feature is enabled or not.
Welcome, new contributor! Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨ |
One thing to consider for this impl: while the I think the behavior should be:
I think Instead I think we should probably adopt the |
…, examples and tests compile
I expected it to work like this and was surprised when it didn't, I would expect this in the future as well (especially with how heavy some preprocessors might be when compiled in).
This works quite well.
Effected this change, just pushed. I do wonder if it should be |
Adjust
bevy_asset::AssetMode::Processed
to take anOption<bool>
that ifNone
will default to whether theasset_processor
feature is enabled or not.Objective
asset_processor
feature to be user controllable at runtime, though default to the prior functionalitySolution
Option<bool>
to thebevy_asset::AssetMode::Processed
head and dispatched on it falling back to thecfg!(feature = "asset_processor")
value.Changelog
Changed:
bevy_asset::AssetMode::Processed
acquired a new argument ofbevy_asset::AssetMode::Processed(Option<boo>)
, ifNone
then prior functionality else it will enable the processor ifSome(true)
or disable it ifSome(false)
overriding the feature.Migration Guide
To continue with the prior functionality just adjust any
AssetMode::Processed
tobevy_asset
's plugin loader to beAssetMode::Processed(None)
.