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

EntityQuery.Matches

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 bool Matches(Entity e);

Parameters

Parameter Description
e The entity to check for match

Returns

bool True if the entity is matched by the query, or false if not.

Description

Returns true if the entity matches the query, false if it does not.

This function will automatically block on any running jobs writing to component data that would affect the results of the check. For a non-blocking variant that ignores any query filtering, see EntityQuery.MatchesIgnoreFilter.

This function creates a EntityQueryMask, if one does not exist for this query already. A maximum of 1024 EntityQueryMasks can be allocated per World.

Additional resources: EntityQuery.MatchesIgnoreFilter