-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Add a Includes query filter for working with disabling components #17803
Copy link
Copy link
Closed
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-FeatureA new feature, making something new possibleA new feature, making something new possibleD-ModestA "normal" level of difficulty; suitable for simple features or challenging fixesA "normal" level of difficulty; suitable for simple features or challenging fixesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!
Metadata
Metadata
Assignees
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-FeatureA new feature, making something new possibleA new feature, making something new possibleD-ModestA "normal" level of difficulty; suitable for simple features or challenging fixesA "normal" level of difficulty; suitable for simple features or challenging fixesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!
Originally posted by @SkiFire13 in #17768 (comment)
When working with default query filters, it's reasonably common to want to be agnostic to the presence of a given disabling component.
Currently, users can stick a
HasorOptionquery data term in there, and get the desired behavior, but they often don't want the information contained in that term.We should provide them with a query filter equivalent, which I think should be called
Includes<C>. This filter would be absolutely useless for normal components, as it includes entities with or without C. But if we set the access up correctly, this should trick DQF into showing us the entities we want, regardless of whether or not they have C.