Crate bevy_schedules_ext

Source
Expand description

§Bevy Schedules, improved

Adds functionality to Bevy’s existing Schedules to allow for nesting and using schedules as a replacement for Sets for system ordering.

§Example

// Schedules can be added to other schedules
app.add_schedules(Update, Child);
app.add_schedules(Child, (GrandchildOne, GrandchildTwo));

// Add systems to schedules directly, no appending `.in_set(...)` to everything!
app.add_systems(Update, update_system);
app.add_systems(Child, child_system);
app.add_systems(GrandchildOne, grandchild_system_one);
app.add_systems(GrandchildTwo, grandchild_system_two);

§Cargo features

The following are the cargo features available for this library (all enabled by default, unless noted otherwise):

  • nesting: Enables nesting of schedules.
  • states: Enables using States as schedules, so you can add systems to your states and have them run when the state is active.
  • app_ext: Extends App with convenience methods (add_schedules for nesting, state schedule related methods for states). Disable this if you don’t want to depend on bevy_app.
  • containers: Adds the ScheduleContainers type and methods on World to manage them. Used by nesting.

Modules§

containers
Extends Bevy’s World with helpers for managing containers for schedules.
nesting
Extends Bevy to enable nesting schedules.
prelude
Exposes all enabled app extensions and re-exports Bevy’s ScheduleLabel.
states
Extends Bevy to allow using states as schedules.