[−]Trait bevy::prelude::System
An ECS system that can be added to a Schedule
Associated Types
Loading content...Required methods
pub fn name(&self) -> Cow<'static, str>
pub fn id(&self) -> SystemId
pub fn update(&mut self, world: &World)
pub fn archetype_component_access(&self) -> &TypeAccess<ArchetypeComponent>
pub fn resource_access(&self) -> &TypeAccess<TypeId>
pub fn thread_local_execution(&self) -> ThreadLocalExecution
pub unsafe fn run_unsafe(
&mut self,
input: Self::In,
world: &World,
resources: &Resources
) -> Option<Self::Out>
&mut self,
input: Self::In,
world: &World,
resources: &Resources
) -> Option<Self::Out>
Safety
This might access World and Resources in an unsafe manner. This should only be called in one of the following contexts:
- This system is the only system running on the given World and Resources across all threads
- This system only runs in parallel with other systems that do not conflict with the
archetype_component_access()
orresource_access()
pub fn run_thread_local(&mut self, world: &mut World, resources: &mut Resources)
pub fn initialize(&mut self, _world: &mut World, _resources: &mut Resources)
Provided methods
pub fn run(
&mut self,
input: Self::In,
world: &mut World,
resources: &mut Resources
) -> Option<Self::Out>
&mut self,
input: Self::In,
world: &mut World,
resources: &mut Resources
) -> Option<Self::Out>
Implementors
impl System for FixedTimestep
type In = ()
type Out = ShouldRun
pub fn name(&self) -> Cow<'static, str>
pub fn id(&self) -> SystemId
pub fn update(&mut self, _world: &World)
pub fn archetype_component_access(&self) -> &TypeAccess<ArchetypeComponent>
pub fn resource_access(&self) -> &TypeAccess<TypeId>
pub fn thread_local_execution(&self) -> ThreadLocalExecution
pub unsafe fn run_unsafe(
&mut self,
_input: <FixedTimestep as System>::In,
_world: &World,
resources: &Resources
) -> Option<<FixedTimestep as System>::Out>
&mut self,
_input: <FixedTimestep as System>::In,
_world: &World,
resources: &Resources
) -> Option<<FixedTimestep as System>::Out>
pub fn run_thread_local(
&mut self,
_world: &mut World,
_resources: &mut Resources
)
&mut self,
_world: &mut World,
_resources: &mut Resources
)
pub fn initialize(&mut self, _world: &mut World, resources: &mut Resources)
impl System for RunOnce
type In = ()
type Out = ShouldRun
pub fn name(&self) -> Cow<'static, str>
pub fn id(&self) -> SystemId
pub fn update(&mut self, _world: &World)
pub fn archetype_component_access(&self) -> &TypeAccess<ArchetypeComponent>
pub fn resource_access(&self) -> &TypeAccess<TypeId>
pub fn thread_local_execution(&self) -> ThreadLocalExecution
pub unsafe fn run_unsafe(
&mut self,
_input: <RunOnce as System>::In,
_world: &World,
_resources: &Resources
) -> Option<<RunOnce as System>::Out>
&mut self,
_input: <RunOnce as System>::In,
_world: &World,
_resources: &Resources
) -> Option<<RunOnce as System>::Out>
pub fn run_thread_local(
&mut self,
_world: &mut World,
_resources: &mut Resources
)
&mut self,
_world: &mut World,
_resources: &mut Resources
)
pub fn initialize(&mut self, _world: &mut World, _resources: &mut Resources)
impl System for ThreadLocalSystemFn
type In = ()
type Out = ()
pub fn name(&self) -> Cow<'static, str>
pub fn update(&mut self, _world: &World)
pub fn archetype_component_access(&self) -> &TypeAccess<ArchetypeComponent>
pub fn resource_access(&self) -> &TypeAccess<TypeId>
pub fn thread_local_execution(&self) -> ThreadLocalExecution
pub unsafe fn run_unsafe(
&mut self,
_input: (),
_world: &World,
_resources: &Resources
) -> Option<()>
&mut self,
_input: (),
_world: &World,
_resources: &Resources
) -> Option<()>
pub fn run_thread_local(&mut self, world: &mut World, resources: &mut Resources)
pub fn initialize(&mut self, _world: &mut World, _resources: &mut Resources)
pub fn id(&self) -> SystemId
impl<In, Out> System for InputFuncSystem<In, Out> where
In: 'static,
Out: 'static,
In: 'static,
Out: 'static,
type In = In
type Out = Out
pub fn name(&self) -> Cow<'static, str>
pub fn id(&self) -> SystemId
pub fn update(&mut self, world: &World)
pub fn archetype_component_access(&self) -> &TypeAccess<ArchetypeComponent>
pub fn resource_access(&self) -> &TypeAccess<TypeId>
pub fn thread_local_execution(&self) -> ThreadLocalExecution
pub unsafe fn run_unsafe(
&mut self,
input: In,
world: &World,
resources: &Resources
) -> Option<Out>
&mut self,
input: In,
world: &World,
resources: &Resources
) -> Option<Out>
pub fn run_thread_local(&mut self, world: &mut World, resources: &mut Resources)
pub fn initialize(&mut self, world: &mut World, resources: &mut Resources)
impl<Out> System for FuncSystem<Out> where
Out: 'static,
Out: 'static,
type In = ()
type Out = Out
pub fn name(&self) -> Cow<'static, str>
pub fn id(&self) -> SystemId
pub fn update(&mut self, world: &World)
pub fn archetype_component_access(&self) -> &TypeAccess<ArchetypeComponent>
pub fn resource_access(&self) -> &TypeAccess<TypeId>
pub fn thread_local_execution(&self) -> ThreadLocalExecution
pub unsafe fn run_unsafe(
&mut self,
_input: <FuncSystem<Out> as System>::In,
world: &World,
resources: &Resources
) -> Option<Out>
&mut self,
_input: <FuncSystem<Out> as System>::In,
world: &World,
resources: &Resources
) -> Option<Out>
pub fn run_thread_local(&mut self, world: &mut World, resources: &mut Resources)
pub fn initialize(&mut self, world: &mut World, resources: &mut Resources)
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 update(&mut self, world: &World)
pub fn archetype_component_access(&self) -> &TypeAccess<ArchetypeComponent>
pub fn resource_access(&self) -> &TypeAccess<TypeId>
pub fn thread_local_execution(&self) -> ThreadLocalExecution
pub unsafe fn run_unsafe(
&mut self,
input: <ChainSystem<SystemA, SystemB> as System>::In,
world: &World,
resources: &Resources
) -> Option<<ChainSystem<SystemA, SystemB> as System>::Out>
&mut self,
input: <ChainSystem<SystemA, SystemB> as System>::In,
world: &World,
resources: &Resources
) -> Option<<ChainSystem<SystemA, SystemB> as System>::Out>