1- use crate :: { First , Main , MainSchedulePlugin , Plugin , Plugins , Startup , StateTransition , Update } ;
1+ use crate :: {
2+ First , MainSchedulePlugin , Plugin , Plugins , Startup , StateTransition , Update , UpdateFlow ,
3+ } ;
24pub use bevy_derive:: AppLabel ;
35use bevy_ecs:: {
46 prelude:: * ,
@@ -94,7 +96,7 @@ impl Debug for App {
9496/// # Example
9597///
9698/// ```rust
97- /// # use bevy_app::{App, AppLabel, SubApp, Main };
99+ /// # use bevy_app::{App, AppLabel, SubApp, UpdateFlow };
98100/// # use bevy_ecs::prelude::*;
99101/// # use bevy_ecs::schedule::ScheduleLabel;
100102///
@@ -115,7 +117,7 @@ impl Debug for App {
115117/// sub_app.insert_resource(Val(100));
116118///
117119/// // initialize main schedule
118- /// sub_app.add_systems(Main , |counter: Res<Val>| {
120+ /// sub_app.add_systems(UpdateFlow , |counter: Res<Val>| {
119121/// // since we assigned the value from the main world in extract
120122/// // we see that value instead of 100
121123/// assert_eq!(counter.0, 10);
@@ -136,7 +138,7 @@ pub struct SubApp {
136138
137139 /// The schedule to run by default.
138140 ///
139- /// This is initially set to [`Main `].
141+ /// This is initially set to [`UpdateFlow `].
140142 pub main_schedule_label : BoxedScheduleLabel ,
141143
142144 /// A function that allows access to both the main [`App`] [`World`] and the [`SubApp`]. This is
@@ -154,7 +156,7 @@ impl SubApp {
154156 pub fn new ( app : App , extract : impl Fn ( & mut World , & mut App ) + Send + Sync + ' static ) -> Self {
155157 Self {
156158 app,
157- main_schedule_label : Box :: new ( Main ) ,
159+ main_schedule_label : Box :: new ( UpdateFlow ) ,
158160 extract : Box :: new ( extract) ,
159161 }
160162 }
@@ -635,7 +637,7 @@ impl App {
635637 /// fn my_runner(mut app: App) {
636638 /// loop {
637639 /// println!("In main loop");
638- /// app.world.run_schedule(Main );
640+ /// app.world.run_schedule(UpdateFlow );
639641 /// }
640642 /// }
641643 ///
@@ -963,8 +965,8 @@ fn run_once(mut app: App) {
963965
964966 {
965967 #[ cfg( feature = "trace" ) ]
966- let _main_schedule_span = info_span ! ( "main schedule" , name = ?Main ) . entered ( ) ;
967- app. world . run_schedule ( Main ) ;
968+ let _ = info_span ! ( "run top schedule" , name = ?UpdateFlow ) . entered ( ) ;
969+ app. world . run_schedule ( UpdateFlow ) ;
968970 }
969971 app. update_sub_apps ( ) ;
970972}
0 commit comments