Function bevy_ecs::schedule::apply_deferred

source ·
pub fn apply_deferred(world: &mut World)
Expand description

Instructs the executor to call System::apply_deferred on the systems that have run but not applied their Deferred system parameters (like Commands) or other system buffers.

§Scheduling

apply_deferred systems are scheduled by default

  • later in the same schedule run (for example, if a system with Commands param is scheduled in Update, all the changes will be visible in PostUpdate)
  • between systems with dependencies if the dependency has deferred buffers (if system bar directly or indirectly depends on foo, and foo uses Commands param, changes to the world in foo will be visible in bar)

§Notes

  • This function (currently) does nothing if it’s called manually or wrapped inside a PipeSystem.
  • Modifying a Schedule may change the order buffers are applied.