Skip to content

Commit 8e18e61

Browse files
authored
Run main schedule at least once to ensure Startup et al run. (#81)
1 parent b604d36 commit 8e18e61

File tree

1 file changed

+8
-0
lines changed
  • crates/processing_render/src

1 file changed

+8
-0
lines changed

crates/processing_render/src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,15 @@ pub fn init(config: Config) -> error::Result<()> {
313313
}
314314

315315
let mut app = create_app(config);
316+
// contrary to what the following methods might imply, this is just finishing plugin setup
317+
// which normally happens in the app runner (i.e. in a "normal" bevy app), but since we don't
318+
// have one we need to do it manually here
316319
app.finish();
317320
app.cleanup();
321+
// also, we need to run the main schedule once to ensure all systems are initialized before we
322+
// return from init, to ensure any plugins that need to do setup in their first update can rely
323+
// on that
324+
app.update();
318325
set_app(app);
319326

320327
Ok(())
@@ -347,6 +354,7 @@ pub async fn init(config: Config) -> error::Result<()> {
347354

348355
app.finish();
349356
app.cleanup();
357+
app.update();
350358
set_app(app);
351359

352360
Ok(())

0 commit comments

Comments
 (0)