Struct EntityQueryMask
Provides an efficient test of whether a specific archetype is included in the set of archetypes matched by an EntityQuery.
Namespace: Unity.Entities
Assembly: Unity.Entities.dll
Syntax
public struct EntityQueryMask
Remarks
Use a query mask to quickly identify whether an entity's archetype would be matched by an EntityQuery.
var mask = query.GetEntityQueryMask();
bool doesArchetypeMatch = mask.MatchesIgnoreFilter(entity);
You can create up to 1024 unique EntityQueryMasks in an application.
Note that EntityQueryMask only filters by Archetype. It ignores any filtering on the EntityQuery (by shared component, change version, or order version), or the state of any enableable components.
One specific instance to be aware of is that if a query uses With
Methods
Name | Description |
---|---|
Matches(Archetype |
Obsolete. Use Matches |
Matches(Entity) | Obsolete. Use Matches |
Matches(Entity |
Reports whether the archetype would be selected by the EntityQuery instance used to create this entity query mask. |
Matches |
Reports whether a chunk's archetype is in the set of archetypes matched by this query. |
Matches |
Reports whether an entity's archetype is in the set of archetypes matched by this query. |