Method ToComponentArray
ToComponentArray<T>(EntityQuery)
Gather values of a component from all entities that match a query into a managed array.
Declaration
[Obsolete("Managed-component access (AddComponentObject/GetComponentObject/SetComponentObject) is deprecated and will be removed. Convert your data to an unmanaged IComponentData and use the unmanaged Add/Get/SetComponentData APIs. To reference UnityEngine.Object instances, use UnityObjectRef<T>. First deprecated in 6.6.")]
public static T[] ToComponentArray<T>(this EntityQuery query) where T : class
Parameters
| Type | Name | Description |
|---|---|---|
| EntityQuery | query | The query whose entities should have their |
Returns
| Type | Description |
|---|---|
| T[] | A managed array of |
Type Parameters
| Name | Description |
|---|---|
| T | The managed component type to gather |