Method GetEntityQuery
GetEntityQuery(params ComponentType[])
Gets the cached query for the specified component types, if one exists; otherwise, creates a new query instance and caches it.
Declaration
[ExcludeFromBurstCompatTesting("Takes managed array")]
public EntityQuery GetEntityQuery(params ComponentType[] componentTypes)
Parameters
Type | Name | Description |
---|---|---|
ComponentType[] | componentTypes | An array or comma-separated list of component types. |
Returns
Type | Description |
---|---|
EntityQuery | The new or cached query. |
GetEntityQuery(ComponentType)
Gets the cached query for the specified component type, if one exists; otherwise, creates a new query instance and caches it.
Declaration
public EntityQuery GetEntityQuery(ComponentType componentType)
Parameters
Type | Name | Description |
---|---|---|
ComponentType | componentType | The type of component to query. |
Returns
Type | Description |
---|---|
EntityQuery | The new or cached query. |
GetEntityQuery(NativeArray<ComponentType>)
Gets the cached query for the specified component types, if one exists; otherwise, creates a new query instance and caches it.
Declaration
public EntityQuery GetEntityQuery(NativeArray<ComponentType> componentTypes)
Parameters
Type | Name | Description |
---|---|---|
NativeArray<ComponentType> | componentTypes | An array of component types. |
Returns
Type | Description |
---|---|
EntityQuery | The new or cached query. |
GetEntityQuery(params EntityQueryDesc[])
Combines an array of query description objects into a single query.
Declaration
[ExcludeFromBurstCompatTesting("Takes managed array")]
public EntityQuery GetEntityQuery(params EntityQueryDesc[] queryDesc)
Parameters
Type | Name | Description |
---|---|---|
EntityQueryDesc[] | queryDesc | An array of query description objects to be combined to define the query. |
Returns
Type | Description |
---|---|
EntityQuery | The new or cached query. |
Remarks
This function looks for a cached query matching the combined query descriptions, and returns it if one exists; otherwise, the function creates a new query instance and caches it.
GetEntityQuery(in EntityQueryBuilder)
Create an entity query from a query description builder.
Declaration
public EntityQuery GetEntityQuery(in EntityQueryBuilder builder)
Parameters
Type | Name | Description |
---|---|---|
EntityQueryBuilder | builder | The description builder |
Returns
Type | Description |
---|---|
EntityQuery | The new or cached query. |
Remarks
This function looks for a cached query matching the combined query descriptions, and returns it if one exists; otherwise, the function creates a new query instance and caches it.