Skip to content

Commit 1d12cd5

Browse files
author
Michael Hsu
committed
rename to final stage
1 parent b121a26 commit 1d12cd5

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

crates/bevy_app/src/app.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ pub struct App {
5656
pub runner: Box<dyn Fn(App)>,
5757
/// A container of [`Stage`]s set to be run in a linear order.
5858
pub schedule: Schedule,
59-
/// stage run after main schedule and sub app schedules
60-
pub stage_very_last: SystemStage,
59+
/// A stage run after main schedule and sub app schedules
60+
pub final_stage: SystemStage,
6161
sub_apps: HashMap<Box<dyn AppLabel>, SubApp>,
6262
}
6363

@@ -100,7 +100,7 @@ impl App {
100100
Self {
101101
world: Default::default(),
102102
schedule: Default::default(),
103-
stage_very_last: SystemStage::single_threaded(),
103+
final_stage: SystemStage::single_threaded(),
104104
runner: Box::new(run_once),
105105
sub_apps: HashMap::default(),
106106
}
@@ -118,7 +118,7 @@ impl App {
118118
for sub_app in self.sub_apps.values_mut() {
119119
(sub_app.runner)(&mut self.world, &mut sub_app.app);
120120
}
121-
self.stage_very_last.run(&mut self.world);
121+
self.final_stage.run(&mut self.world);
122122
}
123123

124124
/// Starts the application by calling the app's [runner function](Self::set_runner).
@@ -330,12 +330,12 @@ impl App {
330330
self.add_system_to_stage(CoreStage::Update, system)
331331
}
332332

333-
/// adds a system to the very last stage
334-
pub fn add_system_very_last<Params>(
333+
/// Adds a system to the final stage that runs after the app and render schedules.
334+
pub fn add_system_to_final_stage<Params>(
335335
&mut self,
336336
system: impl IntoSystemDescriptor<Params>,
337337
) -> &mut Self {
338-
self.stage_very_last.add_system(system);
338+
self.final_stage.add_system(system);
339339
self
340340
}
341341

crates/bevy_core/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ impl Plugin for CorePlugin {
5555
.register_type::<Range<f32>>()
5656
.register_type::<Timer>()
5757
// time system is added as an "exclusive system at end" to ensure it runs after other systems
58-
.add_system_very_last(
58+
.add_system_to_final_stage(
5959
time_system
6060
.exclusive_system()
6161
.at_end()

0 commit comments

Comments
 (0)