docs.unity.cn
    Show / Hide Table of Contents

    Method AddSharedComponentFilter

    AddSharedComponentFilter<SharedComponent>(SharedComponent)

    Filters this EntityQuery so that it only selects entities with an unmanaged shared component of type SharedComponent equal to sharedComponent. Additive with other filter functions.

    Declaration
    [GenerateTestsForBurstCompatibility(GenericTypeArguments = new Type[]{typeof(BurstCompatibleSharedComponentData)})]
    public void AddSharedComponentFilter<SharedComponent>(SharedComponent sharedComponent)
        where SharedComponent : struct, ISharedComponentData
    Parameters
    Type Name Description
    SharedComponent sharedComponent

    The unmanaged shared component value to filter.

    Type Parameters
    Name Description
    SharedComponent

    The type of shared component. This type must also be one of the types used to create the EntityQuery.

    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, June 21, 2023