Documentation

Unity Engine


Unity Engine


CopyFromComponentDataArrayAsync<T>(NativeArray<T>, out JobHandle)

Obsolete. Use EntityQuery.CopyFromComponentDataListAsync instead.
Read time 1 minuteLast updated a day ago

Definition

  • Type: Method
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.EntitiesModule

CopyFromComponentDataArrayAsync<T>(NativeArray<T>, JobHandle)

Warning
Deprecated. This method does not correctly support enableable components, and is generally unsafe. Use CopyFromComponentDataListAsync() instead. (RemovedAfter Entities 1.0)
public void CopyFromComponentDataArrayAsync<T>(NativeArray<T> componentDataArray, out JobHandle jobHandle) where T : unmanaged, IComponentData

Parameters

componentDataArray

The values to copy into the matching entities.

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

Asynchronously copies the values of component type
T
in a NativeArray into the entities matched by this query. This method is generally used in conjunction with EntityQuery.ToComponentDataArrayAsync 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.