CreateEntityQuery
Creates a EntityQuery from an array of component types.
Read time 1 minuteLast updated a day ago
Definition
- Type: Method
- Namespace: Unity.Entities
- Assembly: UnityEngine.EntitiesModule
CreateEntityQuery(ComponentType[])
Creates a EntityQuery from an array of component types.
[ExcludeFromBurstCompatTesting("Takes managed array")]public EntityQuery CreateEntityQuery(params ComponentType[] requiredComponents)
Parameters
An array containing the component types.
Returns
Type | Description |
|---|---|
| EntityQuery | The EntityQuery derived from the specified array of component types. |
Remarks
Additional Resources: EntityQueryDesc
CreateEntityQuery(EntityQueryDesc[])
Creates a EntityQuery from an EntityQueryDesc.
[ExcludeFromBurstCompatTesting("Takes managed array")]public EntityQuery CreateEntityQuery(params EntityQueryDesc[] queriesDesc)
Parameters
An array of query descsriptions identifying a sets of component types to match.
Returns
Type | Description |
|---|---|
| EntityQuery | The EntityQuery corresponding to the queryDesc. |
Remarks
Warning: The ability to construct an EntityQuery from multiple query descriptions is not a supported workflow. Queries with multiple query descriptions are not guaranteed to function correctly in all contexts. In general, try to create queries with a single description. For more information, refer to Creating entity queries.
CreateEntityQuery(EntityQueryBuilder)
Creates an EntityQuery from an EntityQueryBuilder.
public EntityQuery CreateEntityQuery(in EntityQueryBuilder queriesDesc)
Parameters
A queryDesc identifying a set of component types.
Returns
Type | Description |
|---|---|
| EntityQuery | The EntityQuery corresponding to the queryDesc. |