bevyengine / bevyengine/bevy

Expose a way to manually run startup schedules

Open
#15,029 1 comment 0 reactions 0 assignees View on GitHub
A-App C-Feature D-Modest S-Ready-For-Implementation
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## What problem does this solve or what need does it fill?

In a situation where `app.update()` is called manually the user should have control over when startup schedules run, independently of update schedules.

## What solution would you like?

Some API expoes that realizes the goal of `app.run_startup()` (I'm not necessarily advocating _this_ API, just the side effect).

## What alternative(s) have you considered?

I tried adding a `Startup` schedule system to the custom loop example: https://github.com/bevyengine/bevy/blob/main/examples/app/custom_loop.rs

Running `app.update()` does run the startup schedule once, but naturally also systems in update schedules.

The alternative of using https://docs.rs/bevy/latest/bevy/ecs/prelude/struct.World.html#method.run_schedule to target `Startup` will run startup systems, but it does not prevent those same systems from running a second time on the first `app.update()`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.