Skip to content

Add an inverse to Changed and Added filters #7265

Open
@nicopap

Description

@nicopap

Allows exclusive access based on Changed or Added component, similar to With and Without.

See #7264 (comment)

This is very niche, but might help squeeze out some perfs.

What solution would you like?

Add a NotChanged<T> and NotAdded<T> component that returns all entities that their Changed and Added counterparts do not return.

Am I missing something? It seems possible to discriminate based on those filters. Though it would likely require modifying the AccessSet content.

What alternative(s) have you considered?

I added a changed: Query<(), Changed<Transform>> parameter, and call !changed.contains(&entity).

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ECSEntities, components, systems, and eventsC-FeatureA new feature, making something new possibleD-ComplexQuite challenging from either a design or technical perspective. Ask for help!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions