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

EntityManager.CreateEntityQuery

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 CreateEntityQuery(params ComponentType[] requiredComponents);

Parameters

Parameter Description
requiredComponents An array containing the component types.

Returns

EntityQuery The EntityQuery derived from the specified array of component types.

Description

Creates a EntityQuery from an array of component types.

Additional resources: EntityQueryDesc


Declaration

public EntityQuery CreateEntityQuery(params EntityQueryDesc[] queriesDesc);

Parameters

Parameter Description
queriesDesc An array of query descsriptions identifying a sets of component types to match.

Returns

EntityQuery The EntityQuery corresponding to the queryDesc.

Description

Creates a EntityQuery from an EntityQueryDesc.

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.


Declaration

public EntityQuery CreateEntityQuery(ref EntityQueryBuilder queriesDesc);

Parameters

Parameter Description
queriesDesc A queryDesc identifying a set of component types.

Returns

EntityQuery The EntityQuery corresponding to the queryDesc.

Description

Creates an EntityQuery from an EntityQueryBuilder.