docs.unity.cn
    Show / Hide Table of Contents

    Method SetChunkComponentData

    SetChunkComponentData<T>(ref ComponentTypeHandle<T>, T)

    Sets the value of a chunk component.

    Declaration
    public readonly void SetChunkComponentData<T>(ref ComponentTypeHandle<T> typeHandle, T value)
        where T : struct
    Parameters
    Type Name Description
    ComponentTypeHandle<T> typeHandle

    An object containing type and job safety information. To create this object, call GetComponentTypeHandle<T>(Boolean). Pass the object to a job using a public field you define as part of the job struct.

    T value

    A struct of type T containing the new values for the chunk component.

    Type Parameters
    Name Description
    T

    The data type of the chunk component.

    See Also
    GetChunkComponentData<T>(ref ComponentTypeHandle<T>)

    SetChunkComponentData<T>(ComponentTypeHandle<T>, T)

    Obsolete. Use SetChunkComponentData<T>(ref ComponentTypeHandle<T>, T) instead.

    Declaration
    [Obsolete("The typeHandle argument should now be passed by ref. (RemovedAfter Entities 1.0)", false)]
    public readonly void SetChunkComponentData<T>(ComponentTypeHandle<T> typeHandle, T value)
        where T : struct
    Parameters
    Type Name Description
    ComponentTypeHandle<T> typeHandle

    An object containing type and job safety information. To create this object, call GetComponentTypeHandle<T>(Boolean). Pass the object to a job using a public field you define as part of the job struct.

    T value

    A struct of type T containing the new values for the chunk component.

    Type Parameters
    Name Description
    T

    The data type of the chunk component.

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