Struct bevy_internal::ecs::schedule::Stepping
source · pub struct Stepping { /* private fields */ }
Expand description
Resource for controlling system stepping behavior
Implementations§
source§impl Stepping
impl Stepping
sourcepub fn begin_frame(stepping: Option<ResMut<'_, Stepping>>)
pub fn begin_frame(stepping: Option<ResMut<'_, Stepping>>)
System to call denoting that a new render frame has begun
Note: This system is automatically added to the default MainSchedule
.
sourcepub fn schedules(&self) -> Result<&Vec<Interned<dyn ScheduleLabel>>, NotReady>
pub fn schedules(&self) -> Result<&Vec<Interned<dyn ScheduleLabel>>, NotReady>
Return the list of schedules with stepping enabled in the order they are executed in.
sourcepub fn cursor(&self) -> Option<(Interned<dyn ScheduleLabel>, NodeId)>
pub fn cursor(&self) -> Option<(Interned<dyn ScheduleLabel>, NodeId)>
Return our current position within the stepping frame
NOTE: This function will return None
during normal execution with
stepping enabled. This can happen at the end of the stepping frame
after the last system has been run, but before the start of the next
render frame.
sourcepub fn add_schedule(&mut self, schedule: impl ScheduleLabel) -> &mut Stepping
pub fn add_schedule(&mut self, schedule: impl ScheduleLabel) -> &mut Stepping
Enable stepping for the provided schedule
sourcepub fn remove_schedule(&mut self, schedule: impl ScheduleLabel) -> &mut Stepping
pub fn remove_schedule(&mut self, schedule: impl ScheduleLabel) -> &mut Stepping
Disable stepping for the provided schedule
NOTE: This function will also clear any system-specific behaviors that may have been configured.
sourcepub fn clear_schedule(&mut self, schedule: impl ScheduleLabel) -> &mut Stepping
pub fn clear_schedule(&mut self, schedule: impl ScheduleLabel) -> &mut Stepping
Clear behavior set for all systems in the provided Schedule
sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Check if stepping is enabled
sourcepub fn step_frame(&mut self) -> &mut Stepping
pub fn step_frame(&mut self) -> &mut Stepping
Run the next system during the next render frame
NOTE: This will have no impact unless stepping has been enabled
sourcepub fn continue_frame(&mut self) -> &mut Stepping
pub fn continue_frame(&mut self) -> &mut Stepping
Run all remaining systems in the stepping frame during the next render frame
NOTE: This will have no impact unless stepping has been enabled
sourcepub fn always_run<Marker>(
&mut self,
schedule: impl ScheduleLabel,
system: impl IntoSystem<(), (), Marker>
) -> &mut Stepping
pub fn always_run<Marker>( &mut self, schedule: impl ScheduleLabel, system: impl IntoSystem<(), (), Marker> ) -> &mut Stepping
Ensure this system always runs when stepping is enabled
Note: if the system is run multiple times in the Schedule
, this
will apply for all instances of the system.
sourcepub fn always_run_node(
&mut self,
schedule: impl ScheduleLabel,
node: NodeId
) -> &mut Stepping
pub fn always_run_node( &mut self, schedule: impl ScheduleLabel, node: NodeId ) -> &mut Stepping
Ensure this system instance always runs when stepping is enabled
sourcepub fn never_run<Marker>(
&mut self,
schedule: impl ScheduleLabel,
system: impl IntoSystem<(), (), Marker>
) -> &mut Stepping
pub fn never_run<Marker>( &mut self, schedule: impl ScheduleLabel, system: impl IntoSystem<(), (), Marker> ) -> &mut Stepping
Ensure this system never runs when stepping is enabled
sourcepub fn never_run_node(
&mut self,
schedule: impl ScheduleLabel,
node: NodeId
) -> &mut Stepping
pub fn never_run_node( &mut self, schedule: impl ScheduleLabel, node: NodeId ) -> &mut Stepping
Ensure this system instance never runs when stepping is enabled
sourcepub fn set_breakpoint<Marker>(
&mut self,
schedule: impl ScheduleLabel,
system: impl IntoSystem<(), (), Marker>
) -> &mut Stepping
pub fn set_breakpoint<Marker>( &mut self, schedule: impl ScheduleLabel, system: impl IntoSystem<(), (), Marker> ) -> &mut Stepping
Add a breakpoint for system
sourcepub fn set_breakpoint_node(
&mut self,
schedule: impl ScheduleLabel,
node: NodeId
) -> &mut Stepping
pub fn set_breakpoint_node( &mut self, schedule: impl ScheduleLabel, node: NodeId ) -> &mut Stepping
Add a breakpoint for system instance
sourcepub fn clear_breakpoint<Marker>(
&mut self,
schedule: impl ScheduleLabel,
system: impl IntoSystem<(), (), Marker>
) -> &mut Stepping
pub fn clear_breakpoint<Marker>( &mut self, schedule: impl ScheduleLabel, system: impl IntoSystem<(), (), Marker> ) -> &mut Stepping
Clear a breakpoint for the system
sourcepub fn clear_breakpoint_node(
&mut self,
schedule: impl ScheduleLabel,
node: NodeId
) -> &mut Stepping
pub fn clear_breakpoint_node( &mut self, schedule: impl ScheduleLabel, node: NodeId ) -> &mut Stepping
clear a breakpoint for system instance
sourcepub fn clear_system<Marker>(
&mut self,
schedule: impl ScheduleLabel,
system: impl IntoSystem<(), (), Marker>
) -> &mut Stepping
pub fn clear_system<Marker>( &mut self, schedule: impl ScheduleLabel, system: impl IntoSystem<(), (), Marker> ) -> &mut Stepping
Clear any behavior set for the system
sourcepub fn clear_node(
&mut self,
schedule: impl ScheduleLabel,
node: NodeId
) -> &mut Stepping
pub fn clear_node( &mut self, schedule: impl ScheduleLabel, node: NodeId ) -> &mut Stepping
clear a breakpoint for system instance
sourcepub fn skipped_systems(&mut self, schedule: &Schedule) -> Option<FixedBitSet>
pub fn skipped_systems(&mut self, schedule: &Schedule) -> Option<FixedBitSet>
get the list of systems this schedule should skip for this render frame
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Stepping
impl Send for Stepping
impl Sync for Stepping
impl Unpin for Stepping
impl !UnwindSafe for Stepping
Blanket Implementations§
source§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
T
ShaderType
for self
. When used in AsBindGroup
derives, it is safe to assume that all images in self
exist.source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
source§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
source§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Self
using data from the given World
.