docs.unity.cn
    Show / Hide Table of Contents

    Method WithSharedComponentFilter

    WithSharedComponentFilter<T>(ForEachLambdaJobDescription, T)

    Set a shared component filter on the query so that it only matches entities with this shared component value.

    Declaration
    public static ForEachLambdaJobDescription WithSharedComponentFilter<T>(this ForEachLambdaJobDescription description, T sharedComponent)
        where T : struct, ISharedComponentData
    Parameters
    Type Name Description
    Unity.Entities.CodeGeneratedJobForEach.ForEachLambdaJobDescription description

    The target object

    T sharedComponent

    Shared component value

    Returns
    Type Description
    Unity.Entities.CodeGeneratedJobForEach.ForEachLambdaJobDescription

    The target object, suitable for chaining multiple methods

    Type Parameters
    Name Description
    T

    Type of shared component

    WithSharedComponentFilter<T1, T2>(ForEachLambdaJobDescription, T1, T2)

    Set a shared component filter on the query so that it only matches entities with these shared component values.

    Declaration
    public static ForEachLambdaJobDescription WithSharedComponentFilter<T1, T2>(this ForEachLambdaJobDescription description, T1 sharedComponent1, T2 sharedComponent2)
        where T1 : struct, ISharedComponentData where T2 : struct, ISharedComponentData
    Parameters
    Type Name Description
    Unity.Entities.CodeGeneratedJobForEach.ForEachLambdaJobDescription description

    The target object

    T1 sharedComponent1

    First shared component value

    T2 sharedComponent2

    Second shared component value

    Returns
    Type Description
    Unity.Entities.CodeGeneratedJobForEach.ForEachLambdaJobDescription

    The target object, suitable for chaining multiple methods

    Type Parameters
    Name Description
    T1

    First type of shared component

    T2

    Second type of shared component

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