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<'_, Self>>)
pub fn begin_frame(stepping: Option<ResMut<'_, Self>>)
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<InternedScheduleLabel>, NotReady>
pub fn schedules(&self) -> Result<&Vec<InternedScheduleLabel>, NotReady>
Return the list of schedules with stepping enabled in the order they are executed in.
sourcepub fn cursor(&self) -> Option<(InternedScheduleLabel, NodeId)>
pub fn cursor(&self) -> Option<(InternedScheduleLabel, 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 Self
pub fn add_schedule(&mut self, schedule: impl ScheduleLabel) -> &mut Self
Enable stepping for the provided schedule
sourcepub fn remove_schedule(&mut self, schedule: impl ScheduleLabel) -> &mut Self
pub fn remove_schedule(&mut self, schedule: impl ScheduleLabel) -> &mut Self
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 Self
pub fn clear_schedule(&mut self, schedule: impl ScheduleLabel) -> &mut Self
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 Self
pub fn step_frame(&mut self) -> &mut Self
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 Self
pub fn continue_frame(&mut self) -> &mut Self
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 Self
pub fn always_run<Marker>( &mut self, schedule: impl ScheduleLabel, system: impl IntoSystem<(), (), Marker> ) -> &mut Self
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 Self
pub fn always_run_node( &mut self, schedule: impl ScheduleLabel, node: NodeId ) -> &mut Self
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 Self
pub fn never_run<Marker>( &mut self, schedule: impl ScheduleLabel, system: impl IntoSystem<(), (), Marker> ) -> &mut Self
Ensure this system never runs when stepping is enabled
sourcepub fn never_run_node(
&mut self,
schedule: impl ScheduleLabel,
node: NodeId
) -> &mut Self
pub fn never_run_node( &mut self, schedule: impl ScheduleLabel, node: NodeId ) -> &mut Self
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 Self
pub fn set_breakpoint<Marker>( &mut self, schedule: impl ScheduleLabel, system: impl IntoSystem<(), (), Marker> ) -> &mut Self
Add a breakpoint for system
sourcepub fn set_breakpoint_node(
&mut self,
schedule: impl ScheduleLabel,
node: NodeId
) -> &mut Self
pub fn set_breakpoint_node( &mut self, schedule: impl ScheduleLabel, node: NodeId ) -> &mut Self
Add a breakpoint for system instance
sourcepub fn clear_breakpoint<Marker>(
&mut self,
schedule: impl ScheduleLabel,
system: impl IntoSystem<(), (), Marker>
) -> &mut Self
pub fn clear_breakpoint<Marker>( &mut self, schedule: impl ScheduleLabel, system: impl IntoSystem<(), (), Marker> ) -> &mut Self
Clear a breakpoint for the system
sourcepub fn clear_breakpoint_node(
&mut self,
schedule: impl ScheduleLabel,
node: NodeId
) -> &mut Self
pub fn clear_breakpoint_node( &mut self, schedule: impl ScheduleLabel, node: NodeId ) -> &mut Self
clear a breakpoint for system instance
sourcepub fn clear_system<Marker>(
&mut self,
schedule: impl ScheduleLabel,
system: impl IntoSystem<(), (), Marker>
) -> &mut Self
pub fn clear_system<Marker>( &mut self, schedule: impl ScheduleLabel, system: impl IntoSystem<(), (), Marker> ) -> &mut Self
Clear any behavior set for the system
sourcepub fn clear_node(
&mut self,
schedule: impl ScheduleLabel,
node: NodeId
) -> &mut Self
pub fn clear_node( &mut self, schedule: impl ScheduleLabel, node: NodeId ) -> &mut Self
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 Freeze for Stepping
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> 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<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
.