@@ -6,7 +6,8 @@ use crate::{
6
6
} ;
7
7
use bevy_ecs:: {
8
8
clear_trackers_system, FromResources , IntoExclusiveSystem , IntoSystem , Resource , Resources ,
9
- RunOnce , Schedule , Stage , StageLabel , StateStage , SystemDescriptor , SystemStage , World ,
9
+ RunOnce , Schedule , Stage , StageLabel , StateStage , SystemDescriptor , SystemSet , SystemStage ,
10
+ World ,
10
11
} ;
11
12
use bevy_utils:: tracing:: debug;
12
13
@@ -129,6 +130,10 @@ impl AppBuilder {
129
130
self . add_system_to_stage ( CoreStage :: Update , system)
130
131
}
131
132
133
+ pub fn add_system_set ( & mut self , system_set : SystemSet ) -> & mut Self {
134
+ self . add_system_set_to_stage ( CoreStage :: Update , system_set)
135
+ }
136
+
132
137
pub fn add_system_to_stage (
133
138
& mut self ,
134
139
stage_label : impl StageLabel ,
@@ -138,6 +143,17 @@ impl AppBuilder {
138
143
self
139
144
}
140
145
146
+ pub fn add_system_set_to_stage (
147
+ & mut self ,
148
+ stage_label : impl StageLabel ,
149
+ system_set : SystemSet ,
150
+ ) -> & mut Self {
151
+ self . app
152
+ . schedule
153
+ . add_system_set_to_stage ( stage_label, system_set) ;
154
+ self
155
+ }
156
+
141
157
pub fn add_startup_system ( & mut self , system : impl Into < SystemDescriptor > ) -> & mut Self {
142
158
self . add_startup_system_to_stage ( StartupStage :: Startup , system)
143
159
}
0 commit comments