Enable skipping/running SystemSets during Stepping#13219
Enable skipping/running SystemSets during Stepping#13219cBournhonesque wants to merge 8 commits intobevyengine:mainfrom
Conversation
hymm
left a comment
There was a problem hiding this comment.
Haven't looked too closely at the implementation details yet, but this feels much better as a feature of system stepping than the approach in the previous pr.
hymm
left a comment
There was a problem hiding this comment.
What happens if you configure conflicting behavior for two different sets that contain the same system? i.e. one set is set to always run and the other is set to never run.
Great question!
I think this could probably updated; instead the list of Also, AFAIK every |
Objective
app::run_system_set()function #12717run_schedule()function but nothing more specificWorld::run_system_setto run only the systems in aSystemSet#12726, but the solution wasn't very elegantSolution
Instead, I think it's possible to extend the existing system stepping machinery to achieve what I want. It should not be a problem to require system-stepping since
run_system_set()would mostly be used inside tests.As a bonus, the new solution provides more control, since it's possible to run all the systems in a set except for one, etc.
Add functions in SystemStepping to be able to add SystemStepping instructions (
AlwaysRun,NeverRun) for an entireSystemSet. In those cases, system-stepping will issue instructions for every system that is contained inside theSet.For ease of computation I had to add a variable
sets_to_systemsin theScheduleGraph(which is gated behind the system-stepping feature), but it's requiring a lot of#[cfg(feature(bevy_debug_stepping))]statements elsewhere in the code. I wonder if there's a better solution?Testing
Changelog
Added
Extended SystemStepping to be able to Skip/Step-through all the systems of a SystemSet