docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method WithSharedComponentFilter

    WithSharedComponentFilter<TSharedComponent1>(TSharedComponent1)

    Only select chunks that have a specified value for a shared component.

    Declaration
    public QueryEnumerable<T1, T2, T3, T4, T5, T6, T7> WithSharedComponentFilter<TSharedComponent1>(TSharedComponent1 sharedComponent) where TSharedComponent1 : unmanaged, ISharedComponentData
    Parameters
    Type Name Description
    TSharedComponent1 sharedComponent

    The value of TSharedComponent1 which an entity must have in order to match this query

    Returns
    Type Description
    QueryEnumerable<T1, T2, T3, T4, T5, T6, T7>

    QueryEnumerable, which allows enumerating over all Aspects, RefRO, RefRW, EnabledRefRO and EnabledRefRW components that match the constructed Query.

    Type Parameters
    Name Description
    TSharedComponent1

    The shared component type

    WithSharedComponentFilter<TSharedComponent1, TSharedComponent2>(TSharedComponent1, TSharedComponent2)

    Only select chunks that have the specified values for two shared components.

    Declaration
    public QueryEnumerable<T1, T2, T3, T4, T5, T6, T7> WithSharedComponentFilter<TSharedComponent1, TSharedComponent2>(TSharedComponent1 sharedComponent1, TSharedComponent2 sharedComponent2) where TSharedComponent1 : unmanaged, ISharedComponentData where TSharedComponent2 : unmanaged, ISharedComponentData
    Parameters
    Type Name Description
    TSharedComponent1 sharedComponent1

    The value of TSharedComponent1 which an entity must have in order to match this query

    TSharedComponent2 sharedComponent2

    The value of TSharedComponent2 which an entity must have in order to match this query

    Returns
    Type Description
    QueryEnumerable<T1, T2, T3, T4, T5, T6, T7>

    QueryEnumerable, which allows enumerating over all Aspects, RefRO, RefRW, EnabledRefRO and EnabledRefRW components that match the constructed Query.

    Type Parameters
    Name Description
    TSharedComponent1

    The first shared component type

    TSharedComponent2

    The second shared component type

    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)