Skip to content

Commit b757d81

Browse files
committed
move extract after scope to make input processing closer to main app run
1 parent 6df9f4a commit b757d81

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/bevy_app/src/app.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,15 @@ impl App {
159159
.map(|e| e.0.clone());
160160
ComputeTaskPool::init(TaskPool::default).scope(thread_executor, |scope| {
161161
if self.run_once {
162-
for sub_app in self.sub_apps.values_mut() {
163-
(sub_app.extract)(&mut self.world, &mut sub_app.app);
164-
}
165162
for sub_app in self.sub_apps.values_mut() {
166163
scope.spawn(async { (sub_app.runner)(&mut sub_app.app) });
167164
}
168165
}
169166
self.schedule.run(&mut self.world);
170167
});
168+
for sub_app in self.sub_apps.values_mut() {
169+
(sub_app.extract)(&mut self.world, &mut sub_app.app);
170+
}
171171
self.run_once = true;
172172
}
173173

0 commit comments

Comments
 (0)