Add any_for_filter
to built-in run conditions
#17326
Labels
A-ECS
Entities, components, systems, and events
C-Feature
A new feature, making something new possible
D-Straightforward
Simple bug fixes and API improvements, docs, test and examples
S-Ready-For-Implementation
This issue is ready for an implementation PR. Go for it!
What problem does this solve or what need does it fill?
Currently, the only built-in run condition like this is
any_with_component
. However, this very quickly loses value on the systems that depend on a combination of components including the provided component type. Compoundingany_with_component
doesn't address this as it doesn't look at archetypes like a filter does.Take the following system for example:
This is a very basic system, but the built-in run conditions do not provide means to limit the scheduling of this system. If I were to use
any_with_component::<EnemyMovement>
, this system will still run if there areEnemyMovement
components that exist withoutTransform
, and therefore time would be wasted scheduling this system for execution in that frame. Instead, I've used the suggested condition:What solution would you like?
I'm using this in every project in order to appropriately limit my scheduled systems:
What alternative(s) have you considered?
No alternatives.
Additional context
N/A
The text was updated successfully, but these errors were encountered: