Trait bevy::ecs::system::System [−]
An ECS system that can be added to a Schedule
Systems are functions with all arguments implementing SystemParam.
Systems are added to an application using AppBuilder::add_system(my_system.system())
or similar methods, and will generally run once per pass of the main loop.
Systems are executed in parallel, in opportunistic order; data access is managed automatically. It’s possible to specify explicit execution order between specific systems, see SystemDescriptor.
Associated Types
Loading content...Required methods
pub fn name(&self) -> Cow<'static, str>
pub fn id(&self) -> SystemId
pub fn new_archetype(&mut self, archetype: &Archetype)
pub fn component_access(&self) -> &Access<ComponentId>
pub fn archetype_component_access(&self) -> &Access<ArchetypeComponentId>
pub fn is_send(&self) -> bool
pub unsafe fn run_unsafe(&mut self, input: Self::In, world: &World) -> Self::Out
Safety
This might access World and Resources in an unsafe manner. This should only be called in one
of the following contexts: 1. This system is the only system running on the given World
across all threads 2. This system only runs in parallel with other systems that do not
conflict with the archetype_component_access()
pub fn apply_buffers(&mut self, world: &mut World)
pub fn initialize(&mut self, _world: &mut World)
pub fn check_change_tick(&mut self, change_tick: u32)
Provided methods
Loading content...Implementors
impl System for FixedTimestep
type In = ()
type Out = ShouldRun
pub fn name(&self) -> Cow<'static, str>
pub fn id(&self) -> SystemId
pub fn new_archetype(&mut self, archetype: &Archetype)
pub fn archetype_component_access(&self) -> &Access<ArchetypeComponentId>
pub fn component_access(&self) -> &Access<ComponentId>
pub fn is_send(&self) -> bool
pub unsafe fn run_unsafe(
&mut self,
_input: <FixedTimestep as System>::In,
world: &World
) -> <FixedTimestep as System>::Out
&mut self,
_input: <FixedTimestep as System>::In,
world: &World
) -> <FixedTimestep as System>::Out
pub fn apply_buffers(&mut self, world: &mut World)
pub fn initialize(&mut self, world: &mut World)
pub fn check_change_tick(&mut self, change_tick: u32)
impl System for RunOnce
type In = ()
type Out = ShouldRun
pub fn name(&self) -> Cow<'static, str>
pub fn id(&self) -> SystemId
pub fn new_archetype(&mut self, _archetype: &Archetype)
pub fn component_access(&self) -> &Access<ComponentId>
pub fn archetype_component_access(&self) -> &Access<ArchetypeComponentId>
pub fn is_send(&self) -> bool
pub unsafe fn run_unsafe(
&mut self,
_input: <RunOnce as System>::In,
_world: &World
) -> <RunOnce as System>::Out
&mut self,
_input: <RunOnce as System>::In,
_world: &World
) -> <RunOnce as System>::Out
pub fn apply_buffers(&mut self, _world: &mut World)
pub fn initialize(&mut self, _world: &mut World)
pub fn check_change_tick(&mut self, _change_tick: u32)
impl<In, Out, Param, Marker, F> System for FunctionSystem<In, Out, Param, Marker, F> where
Param: SystemParam + 'static,
In: 'static,
Out: 'static,
F: SystemParamFunction<In, Out, Param, Marker> + Send + Sync + 'static,
Marker: 'static,
Param: SystemParam + 'static,
In: 'static,
Out: 'static,
F: SystemParamFunction<In, Out, Param, Marker> + Send + Sync + 'static,
Marker: 'static,
type In = In
type Out = Out
pub fn name(&self) -> Cow<'static, str>
pub fn id(&self) -> SystemId
pub fn new_archetype(&mut self, archetype: &Archetype)
pub fn component_access(&self) -> &Access<ComponentId>
pub fn archetype_component_access(&self) -> &Access<ArchetypeComponentId>
pub fn is_send(&self) -> bool
pub unsafe fn run_unsafe(
&mut self,
input: <FunctionSystem<In, Out, Param, Marker, F> as System>::In,
world: &World
) -> <FunctionSystem<In, Out, Param, Marker, F> as System>::Out
&mut self,
input: <FunctionSystem<In, Out, Param, Marker, F> as System>::In,
world: &World
) -> <FunctionSystem<In, Out, Param, Marker, F> as System>::Out
pub fn apply_buffers(&mut self, world: &mut World)
pub fn initialize(&mut self, world: &mut World)
pub fn check_change_tick(&mut self, change_tick: u32)
impl<SystemA, SystemB> System for ChainSystem<SystemA, SystemB> where
SystemB: System<In = <SystemA as System>::Out>,
SystemA: System,
SystemB: System<In = <SystemA as System>::Out>,
SystemA: System,
type In = <SystemA as System>::In
type Out = <SystemB as System>::Out
pub fn name(&self) -> Cow<'static, str>
pub fn id(&self) -> SystemId
pub fn new_archetype(&mut self, archetype: &Archetype)
pub fn archetype_component_access(&self) -> &Access<ArchetypeComponentId>
pub fn component_access(&self) -> &Access<ComponentId>
pub fn is_send(&self) -> bool
pub unsafe fn run_unsafe(
&mut self,
input: <ChainSystem<SystemA, SystemB> as System>::In,
world: &World
) -> <ChainSystem<SystemA, SystemB> as System>::Out
&mut self,
input: <ChainSystem<SystemA, SystemB> as System>::In,
world: &World
) -> <ChainSystem<SystemA, SystemB> as System>::Out