@@ -29,8 +29,8 @@ pub mod prelude {
2929
3030use bevy_ecs:: {
3131 schedule_v3:: {
32- apply_system_buffers, IntoSystemConfig , IntoSystemSetConfig , Schedule , ScheduleLabel ,
33- SystemSet ,
32+ apply_system_buffers, IntoSystemConfig , IntoSystemSetConfig , IntoSystemSetConfigs ,
33+ Schedule , ScheduleLabel , SystemSet ,
3434 } ,
3535 system:: Local ,
3636 world:: World ,
@@ -90,6 +90,7 @@ impl CoreSchedule {
9090/// that runs immediately after the matching system set.
9191/// These can be useful for ordering, but you almost never want to add your systems to these sets.
9292#[ derive( Debug , Hash , PartialEq , Eq , Clone , SystemSet ) ]
93+ #[ system_set( base) ]
9394pub enum CoreSet {
9495 /// Runs before all other members of this set.
9596 First ,
@@ -129,20 +130,30 @@ impl CoreSet {
129130 let mut schedule = Schedule :: new ( ) ;
130131
131132 // Create "stage-like" structure using buffer flushes + ordering
132- schedule. add_system ( apply_system_buffers. in_set ( FirstFlush ) ) ;
133- schedule. add_system ( apply_system_buffers. in_set ( PreUpdateFlush ) ) ;
134- schedule. add_system ( apply_system_buffers. in_set ( UpdateFlush ) ) ;
135- schedule. add_system ( apply_system_buffers. in_set ( PostUpdateFlush ) ) ;
136- schedule. add_system ( apply_system_buffers. in_set ( LastFlush ) ) ;
137-
138- schedule. configure_set ( First . before ( FirstFlush ) ) ;
139- schedule. configure_set ( PreUpdate . after ( FirstFlush ) . before ( PreUpdateFlush ) ) ;
140- schedule. configure_set ( StateTransitions . after ( PreUpdateFlush ) . before ( FixedUpdate ) ) ;
141- schedule. configure_set ( FixedUpdate . after ( StateTransitions ) . before ( Update ) ) ;
142- schedule. configure_set ( Update . after ( FixedUpdate ) . before ( UpdateFlush ) ) ;
143- schedule. configure_set ( PostUpdate . after ( UpdateFlush ) . before ( PostUpdateFlush ) ) ;
144- schedule. configure_set ( Last . after ( PostUpdateFlush ) . before ( LastFlush ) ) ;
145-
133+ schedule
134+ . set_default_base_set ( Update )
135+ . add_system ( apply_system_buffers. in_base_set ( FirstFlush ) )
136+ . add_system ( apply_system_buffers. in_base_set ( PreUpdateFlush ) )
137+ . add_system ( apply_system_buffers. in_base_set ( UpdateFlush ) )
138+ . add_system ( apply_system_buffers. in_base_set ( PostUpdateFlush ) )
139+ . add_system ( apply_system_buffers. in_base_set ( LastFlush ) )
140+ . configure_sets (
141+ (
142+ First ,
143+ FirstFlush ,
144+ PreUpdate ,
145+ PreUpdateFlush ,
146+ StateTransitions ,
147+ FixedUpdate ,
148+ Update ,
149+ UpdateFlush ,
150+ PostUpdate ,
151+ PostUpdateFlush ,
152+ Last ,
153+ LastFlush ,
154+ )
155+ . chain ( ) ,
156+ ) ;
146157 schedule
147158 }
148159}
0 commit comments