docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    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: solution.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 doesn't support EntityQuery shared component, change filtering, or enableable components.

    Methods

    Name Description
    Matches(ArchetypeChunk)

    Obsolete. Use MatchesIgnoreFilter(ArchetypeChunk) instead.

    Matches(Entity)

    Obsolete. Use MatchesIgnoreFilter(Entity) instead.

    Matches(EntityArchetype)

    Reports whether the archetype would be selected by the EntityQuery instance used to create this entity query mask.

    MatchesIgnoreFilter(ArchetypeChunk)

    Reports whether a chunk's archetype is in the set of archetypes matched by this query.

    MatchesIgnoreFilter(Entity)

    Reports whether an entity's archetype is in the set of archetypes matched by this query.

    See Also

    GetEntityQueryMask(EntityQuery)
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)