Version: Unity 7.0 Alpha (7000.0)
LanguageEnglish
  • C#

SystemState.GetEntityQuery

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public EntityQuery GetEntityQuery(params ComponentType[] componentTypes);

Parameters

Parameter Description
componentTypes An array or comma-separated list of component types.

Returns

EntityQuery The new or cached query.

Description

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(ComponentType componentType);

Parameters

Parameter Description
componentType The type of component to query.

Returns

EntityQuery The new or cached query.

Description

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(NativeArray<ComponentType> componentTypes);

Parameters

Parameter Description
componentTypes An array of component types.

Returns

EntityQuery The new or cached query.

Description

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(params EntityQueryDesc[] queryDesc);

Parameters

Parameter Description
queryDesc An array of query description objects to be combined to define the query.

Returns

EntityQuery The new or cached query.

Description

Combines an array of query description objects into a single query.

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.


Declaration

public EntityQuery GetEntityQuery(ref EntityQueryBuilder builder);

Parameters

Parameter Description
builder The description builder

Returns

EntityQuery The new or cached query.

Description

Create an entity query from a query description builder.

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.