docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method CompareComponents

    CompareComponents(ComponentType[])

    Obsolete. Use CompareQuery(in EntityQueryBuilder) instead.

    Declaration
    [Obsolete("This method is not Burst-compatible. Use CompareQuery(in EntityQueryBuilder queryDesc) instead. (RemovedAfter Entities 1.0)")]
    public bool CompareComponents(ComponentType[] componentTypes)
    Parameters
    Type Name Description
    ComponentType[] componentTypes

    An array of ComponentType objects.

    Returns
    Type Description
    bool

    True, if the list of types, including any read/write access specifiers, matches the list of required component types of this EntityQuery.

    Remarks

    Obsolete. Use CompareQuery(in EntityQueryBuilder) instead.

     Compares a list of component types to the types defining this EntityQuery.
     Only required types in the query are used as the basis for the comparison.
     If you include types that the query excludes or only includes as optional,
     the comparison returns false.
    

    CompareComponents(NativeArray<ComponentType>)

    Obsolete. Use CompareQuery(in EntityQueryBuilder) instead.

    Declaration
    [Obsolete("Use CompareQuery(in EntityQueryBuilder queryDesc) instead. (RemovedAfter Entities 1.0)")]
    public bool CompareComponents(NativeArray<ComponentType> componentTypes)
    Parameters
    Type Name Description
    NativeArray<ComponentType> componentTypes

    An array of ComponentType objects.

    Returns
    Type Description
    bool

    True, if the list of types, including any read/write access specifiers, matches the list of required component types of this EntityQuery.

    Remarks

    Obsolete. Use CompareQuery(in EntityQueryBuilder) instead.

     Compares a list of component types to the types defining this EntityQuery.
     Only required types in the query are used as the basis for the comparison.
     If you include types that the query excludes or only includes as optional,
     the comparison returns false. Do not include the <xref href="Unity.Entities.Entity" data-throw-if-not-resolved="false"></xref> type, which
     is included implicitly.
    
    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)