docs.unity3d.com
Search Results for

    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
    public void CopyFromComponentDataArray<T>(NativeArray<T> componentDataArray) where T : unmanaged, 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.

    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)