-
-
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
Support run_if
for SystemConfigs
#7659
Comments
From #7634. I want this and looked into implementing it twice, but it's not a completely trivial change. |
# 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`.
The issue seems not fixed yet. Below code won't compile
From rust doc, closures implement both Copy and Clone if all of the captured variables do. Many common conditions can't be used by |
This should be moved into milestone 0.11 . |
What problem does this solve or what need does it fill?
Support code like below
The text was updated successfully, but these errors were encountered: