-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
System & frame stepping support #8063
Closed
Closed
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
a8e8801
start of adding stepping support
dmlary c78fa5b
Adding ScheduleEvent for controlling stepping
dmlary 12e6fb7
Added system/frame stepping support to breakout example
dmlary 800f1c7
Apply suggestions from code review
dmlary c6cc6e2
Adds stepping to MultiThreadedExecutor
dmlary e0175c9
Incorporated the majority of code-review feedback
dmlary bccf33f
Remove debugging println!(), add comments
dmlary 9e10e41
Moved stepping logic into SystemSchedule
dmlary 2aaa702
Updated tests for `Schedule`
dmlary b1c4be8
update breakout example, `Schedule::executable()`
dmlary 80743f4
example/games/breakout.rs: remove commented out code
dmlary 803a8a0
Merge remote-tracking branch 'origin/main' into stepping
dmlary a6cf35e
fixed breakout example
dmlary 997a25a
stepping demo UI updated; moved into module
dmlary fddcd0b
bug fix, and stepping working in alien_cake_addict
dmlary 537987e
Add `ignore_stepping()` to all bevy systems
dmlary 240abc4
cleanup for CI
dmlary fb4668f
more ci fixes
dmlary 2ea6e9b
code cleanup, and CI fixes
dmlary 05719d9
check-doc fixes
dmlary File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
mod stepping { | ||
use bevy_app::prelude::*; | ||
use bevy_app::App; | ||
use bevy_ecs::prelude::*; | ||
use bevy_ecs::schedule::ScheduleEvent; | ||
|
||
// verify App::update() ScheduleEvents behavior | ||
#[test] | ||
fn app_update_schedule_events() { | ||
let mut app = App::new(); | ||
|
||
// add a system to write a ScheduleEvent | ||
app.add_systems(Update, |mut schedule_events: EventWriter<ScheduleEvent>| { | ||
schedule_events.send(ScheduleEvent::EnableStepping(Box::new(Main))); | ||
}); | ||
|
||
// ensure stepping isn't enabled on the schedule | ||
let schedule = app.get_schedule(Main).unwrap(); | ||
assert!(!schedule.stepping()); | ||
|
||
app.update(); | ||
|
||
// verify the event was sent to the schedule by verifing stepping has | ||
// been turned on | ||
let schedule = app.get_schedule(Main).unwrap(); | ||
assert!(schedule.stepping()); | ||
|
||
// verify the ScheduleEvent list was cleared | ||
let schedule_events = app.world.get_resource::<Events<ScheduleEvent>>().unwrap(); | ||
assert!(schedule_events.is_empty()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I don't really understand why
rustfmt
is indenting this, but it happens everywhere I addedignore_stepping()
to a tuple.