# CopyFromComponentDataListAsync

> Asynchronously copies the values of component type T in a NativeList into the entities matched by this query.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Entities](/engine/7000.0/script-reference/unity/entities.md)
* **Assembly:** UnityEngine.EntitiesModule

## CopyFromComponentDataListAsync\<T>(NativeList\<T>, JobHandle)

Asynchronously copies the values of component type `T` in a NativeList into the entities matched by this query.

```csharp
public void CopyFromComponentDataListAsync<T>(NativeList<T> componentDataList, out JobHandle outJobHandle) where T : unmanaged, IComponentData
```

### Parameters

**** (\[NativeList\<T>]\(/engine/7000.0/script-reference/unity/collections/nativelist1)): The values to copy into the matching entities.**** (\[JobHandle]\(/engine/7000.0/script-reference/unity/jobs/jobhandle)): An `out` parameter assigned a handle that you can use as a dependency for a Job that should happen after this operation completes.

### Remarks

The job scheduled by this call will automatically use the component safety system to determine its input dependencies, to avoid the most common race conditions. If additional input dependencies are required beyond what the component safety system knows about, use [EntityQuery.CopyFromComponentDataListAsync](/engine/7000.0/script-reference/unity/entities/entityquery/copyfromcomponentdatalistasync.md).

This method is generally used in conjunction with [EntityQuery.ToComponentDataListAsync](/engine/7000.0/script-reference/unity/entities/entityquery/tocomponentdatalistasync.md) to extract component values, pass them into some code that expects a flat array of values, and then scatter the updated values back to entities.

## CopyFromComponentDataListAsync\<T>(NativeList\<T>, JobHandle, JobHandle)

Asynchronously copies the values of component type `T` in a NativeList into the entities matched by this query.

```csharp
public void CopyFromComponentDataListAsync<T>(NativeList<T> componentDataList, JobHandle additionalInputDep, out JobHandle outJobHandle) where T : unmanaged, IComponentData
```

### Parameters

**** (\[NativeList\<T>]\(/engine/7000.0/script-reference/unity/collections/nativelist1)): The values to copy into the matching entities.**** (\[JobHandle]\(/engine/7000.0/script-reference/unity/jobs/jobhandle)): A job handle which the newly scheduled job will depend upon, in addition to the dependencies automatically determined by the component safety system.**** (\[JobHandle]\(/engine/7000.0/script-reference/unity/jobs/jobhandle)): An `out` parameter assigned a handle that you can use as a dependency for a Job that should happen after this operation completes.

### Remarks

This method is generally used in conjunction with [EntityQuery.ToComponentDataListAsync](/engine/7000.0/script-reference/unity/entities/entityquery/tocomponentdatalistasync.md) to extract component values, pass them into some code that expects a flat array of values, and then scatter the updated values back to entities.
