Implement QueryData
for &Archetype
#12393
Labels
A-ECS
Entities, components, systems, and events
A-Networking
Sending data between clients, servers and machines
C-Feature
A new feature, making something new possible
Description of the feature request
&Archetype
is a reference that can be accessed withEntityRef
andEntityMut
in a query. These latter two however hurt parallization when queried. If one does that only to get&Archetype
, that restriction is needless as the archetype reference alone does not require further access to the component data.It would make sense to offer this type as a
QueryData
that can also be freely added to a query withQuery::transmute_lense
.Also, since the number of archetypes a query accesses is most likely much smaller than the number of matched entites, one could consider giving
Query
a new method that returns an Iterator over&Archetype
s.What problem does this solve or what need does it fill?
I have no personal use case, I just noticed that when looking through the docs to answer someone's question, what else than components can be queried. If someone can come up with an actual use case, please share it in this issue.
The text was updated successfully, but these errors were encountered: