4 releases
0.14.1 | Aug 7, 2024 |
---|---|
0.13.2 | Mar 17, 2024 |
0.13.1 | Feb 29, 2024 |
0.13.0 | Feb 26, 2024 |
#617 in Game dev
21KB
283 lines
Bevy Schedules, improved
Adds functionality to Bevy's existing Schedules, allowing nesting and using schedules as a replacement for Sets for system grouping and ordering.
Extends Bevy's existing structures, no .add_plugin
or managing new Resources.
Features
Nesting
Nest one or more schedules:
With bevy_schedules_ext |
Vanilla bevy |
|
|
All systems will run in Bevy's update loop without having to manually call run
on the custom schedules.
A full example is available in examples/nested_schedules.rs.
States
Use Bevy's States as Schedules, so you can add systems to your states and have them run when the state is active, no run conditions needed.
With bevy_schedules_ext |
Vanilla bevy |
|
|
A full example is available in examples/states.rs.
Downsides
Since running a schedule requires exclusive world access, schedules can't run in parallel. So any time systems in different groupings need to run in parallel, nesting or using schedule states will block that. Ideally, you'd use a combination of both this crate and vanilla Bevy, with schedules to contain the larger groupings of systems and vanilla Bevy to handle groups that might overlap.
Bevy compatibility
Bevy version | bevy_schedules_ext version |
---|---|
main branch |
master branch |
0.14.1 |
0.14.1 |
0.13 |
0.13 |
Note: A newer version of this crate may work on an older version of Bevy and vice versa, however it's not tested
and would require extra work on your part (e.g. patching Cargo.toml
to match the versions).
License
All code in this repository is dual-licensed under either:
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
at your option. This means you can select the license you prefer.
Your contributions
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Dependencies
~8–11MB
~185K SLoC