Trait bevy::ecs::schedule::IntoSystemConfigs
pub trait IntoSystemConfigs<Marker>: Sized {
// Provided methods
fn in_set(self, set: impl FreeSystemSet) -> SystemConfigs { ... }
fn in_base_set(self, set: impl BaseSystemSet) -> SystemConfigs { ... }
fn before<M>(self, set: impl IntoSystemSet<M>) -> SystemConfigs { ... }
fn after<M>(self, set: impl IntoSystemSet<M>) -> SystemConfigs { ... }
fn distributive_run_if<M>(
self,
condition: impl Condition<M> + Clone
) -> SystemConfigs { ... }
fn ambiguous_with<M>(self, set: impl IntoSystemSet<M>) -> SystemConfigs { ... }
fn ambiguous_with_all(self) -> SystemConfigs { ... }
fn chain(self) -> SystemConfigs { ... }
}
Expand description
Types that can convert into a SystemConfigs
.
Provided Methods§
fn in_set(self, set: impl FreeSystemSet) -> SystemConfigs
fn in_set(self, set: impl FreeSystemSet) -> SystemConfigs
Add these systems to the provided set
.
fn in_base_set(self, set: impl BaseSystemSet) -> SystemConfigs
fn in_base_set(self, set: impl BaseSystemSet) -> SystemConfigs
Add these systems to the provided “base” set
. For more information on base sets, see SystemSet::is_base
.
fn before<M>(self, set: impl IntoSystemSet<M>) -> SystemConfigs
fn before<M>(self, set: impl IntoSystemSet<M>) -> SystemConfigs
Run before all systems in set
.
fn after<M>(self, set: impl IntoSystemSet<M>) -> SystemConfigs
fn after<M>(self, set: impl IntoSystemSet<M>) -> SystemConfigs
Run after all systems in set
.
fn distributive_run_if<M>(
self,
condition: impl Condition<M> + Clone
) -> SystemConfigs
fn distributive_run_if<M>( self, condition: impl Condition<M> + Clone ) -> SystemConfigs
Add a run condition to each contained system.
Each system will receive its own clone of the Condition
and will only run
if the Condition
is true.
Each individual condition will be evaluated at most once (per schedule run), right before the corresponding system prepares to run.
This is equivalent to calling run_if
on each individual
system, as shown below:
app.add_systems((a, b).distributive_run_if(condition));
app.add_systems((a.run_if(condition), b.run_if(condition)));
Note
Because the conditions are evaluated separately for each system, there is no guarantee that all evaluations in a single schedule run will yield the same result. If another system is run inbetween two evaluations it could cause the result of the condition to change.
Use run_if
on a SystemSet
if you want to make sure
that either all or none of the systems are run, or you don’t want to evaluate the run
condition for each contained system separately.
fn ambiguous_with<M>(self, set: impl IntoSystemSet<M>) -> SystemConfigs
fn ambiguous_with<M>(self, set: impl IntoSystemSet<M>) -> SystemConfigs
Suppress warnings and errors that would result from these systems having ambiguities
(conflicting access but indeterminate order) with systems in set
.
fn ambiguous_with_all(self) -> SystemConfigs
fn ambiguous_with_all(self) -> SystemConfigs
Suppress warnings and errors that would result from these systems having ambiguities (conflicting access but indeterminate order) with any other system.
fn chain(self) -> SystemConfigs
fn chain(self) -> SystemConfigs
Treat this collection as a sequence of systems.
Ordering constraints will be applied between the successive elements.