-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[Merged by Bors] - Add distributive_run_if
to IntoSystemConfigs
#7724
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good change, this should be uncontroversial.
This needs to be included in one of our examples, but it doesn't have to be done in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice to pull this out. Agreed: I think we have consensus on this bit.
bors r+ |
# Objective - Fixes #7659. ## Solution - This PR extracted the `distributive_run_if` part of #7676, because it does not require the controversial introduction of anonymous system sets. - The distinctive name should make the user aware about the differences between `IntoSystemConfig::run_if` and `IntoSystemConfigs::distributive_run_if`. - The documentation explains in detail the consequences of using the API and possible pit falls when using it. - A test demonstrates the possibility of changing the condition result, resulting in some of the systems not being run. --- ## Changelog ### Added - Add `distributive_run_if` to `IntoSystemConfigs` to enable adding a run condition to each system when using `add_systems`.
Pull request successfully merged into main. Build succeeded:
|
distributive_run_if
to IntoSystemConfigs
distributive_run_if
to IntoSystemConfigs
# Objective - Fixes bevyengine#7659. ## Solution - This PR extracted the `distributive_run_if` part of bevyengine#7676, because it does not require the controversial introduction of anonymous system sets. - The distinctive name should make the user aware about the differences between `IntoSystemConfig::run_if` and `IntoSystemConfigs::distributive_run_if`. - The documentation explains in detail the consequences of using the API and possible pit falls when using it. - A test demonstrates the possibility of changing the condition result, resulting in some of the systems not being run. --- ## Changelog ### Added - Add `distributive_run_if` to `IntoSystemConfigs` to enable adding a run condition to each system when using `add_systems`.
Objective
run_if
for SystemConfigs #7659.Solution
distributive_run_if
part ofrun_if
forSystemConfigs
via anonymous system sets #7676, because it does not require the controversial introduction of anonymous system sets.IntoSystemConfig::run_if
andIntoSystemConfigs::distributive_run_if
.Changelog
Added
distributive_run_if
toIntoSystemConfigs
to enable adding a run condition to each system when usingadd_systems
.