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.
  • app_ext: Extends App with convenience methods (add_schedules). Disable this if you don’t want to depend on bevy_app.
  • nesting_containers (deprecated): Nested schedules are added to a container, instead of as systems directly. This will be the default, so if you want to use the old behavior, see history for a way to do it yourself.
  • containers: Enabled by nesting_containers. Adds the ScheduleContainers type and methods on World to manage them.
  • states: Enables using States as schedules, so you can add systems to your states and have them run when the state is active.

Modules§