Struct bevy::ecs::system::SystemChangeTick
pub struct SystemChangeTick { /* private fields */ }
Expand description
A SystemParam
that reads the previous and current change ticks of the system.
A system’s change ticks are updated each time it runs:
last_change_tick
copies the previous value ofchange_tick
change_tick
copies the current value ofWorld::read_change_tick
Component change ticks that are more recent than last_change_tick
will be detected by the system.
Those can be read by calling last_changed
on a Mut<T>
or ResMut<T>
.
Implementations§
§impl SystemChangeTick
impl SystemChangeTick
pub fn change_tick(&self) -> u32
pub fn change_tick(&self) -> u32
Returns the current World
change tick seen by the system.
pub fn last_change_tick(&self) -> u32
pub fn last_change_tick(&self) -> u32
Returns the World
change tick seen by the system the previous time it ran.
Trait Implementations§
§impl Debug for SystemChangeTick
impl Debug for SystemChangeTick
§impl SystemParam for SystemChangeTick
impl SystemParam for SystemChangeTick
§type Item = SystemChangeTick
type Item = SystemChangeTick
The item type returned when constructing this system param.
The value of this associated type should be
Self
, instantiated with new lifetimes. Read more§fn init_state(
_world: &mut World,
_system_meta: &mut SystemMeta
) -> <SystemChangeTick as SystemParam>::State
fn init_state( _world: &mut World, _system_meta: &mut SystemMeta ) -> <SystemChangeTick as SystemParam>::State
Registers any
World
access used by this SystemParam
and creates a new instance of this param’s State
.§unsafe fn get_param<'w, 's>(
_state: &'s mut <SystemChangeTick as SystemParam>::State,
system_meta: &SystemMeta,
_world: &'w World,
change_tick: u32
) -> <SystemChangeTick as SystemParam>::Item<'w, 's>
unsafe fn get_param<'w, 's>( _state: &'s mut <SystemChangeTick as SystemParam>::State, system_meta: &SystemMeta, _world: &'w World, change_tick: u32 ) -> <SystemChangeTick as SystemParam>::Item<'w, 's>
Safety Read more
§fn new_archetype(
_state: &mut Self::State,
_archetype: &Archetype,
_system_meta: &mut SystemMeta
)
fn new_archetype( _state: &mut Self::State, _archetype: &Archetype, _system_meta: &mut SystemMeta )
For the specified
Archetype
, registers the components accessed by this SystemParam
(if applicable).§fn apply(state: &mut Self::State, system_meta: &SystemMeta, world: &mut World)
fn apply(state: &mut Self::State, system_meta: &SystemMeta, world: &mut World)
Applies any deferred mutations stored in this
SystemParam
’s state.
This is used to apply Commands
during apply_system_buffers
.impl ReadOnlySystemParam for SystemChangeTick
Auto Trait Implementations§
impl RefUnwindSafe for SystemChangeTick
impl Send for SystemChangeTick
impl Sync for SystemChangeTick
impl Unpin for SystemChangeTick
impl UnwindSafe for SystemChangeTick
Blanket Implementations§
§impl<T, U> AsBindGroupShaderType<U> for Twhere
U: ShaderType,
&'a T: for<'a> Into<U>,
impl<T, U> AsBindGroupShaderType<U> for Twhere U: ShaderType, &'a T: for<'a> Into<U>,
§fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
Return the
T
ShaderType
for self
. When used in AsBindGroup
derives, it is safe to assume that all images in self
exist.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
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
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.