docs.unity.cn
    Show / Hide Table of Contents

    Method CopyFromComponentDataArray

    CopyFromComponentDataArray<T>(NativeArray<T>)

    Copies the values of component type T in a NativeArray into the entities matched by this query.

    Declaration
    [GenerateTestsForBurstCompatibility(GenericTypeArguments = new Type[]{typeof(BurstCompatibleComponentData)})]
    public void CopyFromComponentDataArray<T>(NativeArray<T> componentDataArray)
        where T : struct, IComponentData
    Parameters
    Type Name Description
    NativeArray<T> componentDataArray

    The values to copy into the matching entities.

    Type Parameters
    Name Description
    T

    The component type.

    Remarks

    This version of the function blocks on all registered jobs that access any of the query components. For a non-blocking variant, see CopyFromComponentDataListAsync<T>(NativeList<T>, out JobHandle)

    Exceptions
    Type Condition
    InvalidOperationException

    Thrown if T is not part of the query.

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