文档

Unity Engine

Download Unity

Unity Engine

CompareComponents

Obsolete. Use EntityQuery.CompareQuery instead.
阅读时间1 分钟最后更新于 19 天前

Definition

  • Type: Method
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.EntitiesModule

CompareComponents(ComponentType[])

Obsolete. Use EntityQuery.CompareQuery instead.
警告
Deprecated. This method is not Burst-compatible. Use CompareQuery(in EntityQueryBuilder queryDesc) instead. (RemovedAfter Entities 1.0)
public bool CompareComponents(ComponentType[] componentTypes)

Parameters

componentTypes

An array of ComponentType objects.

Returns

Type

Description

boolTrue, if the list of types, including any read/write access specifiers, matches the list of required component types of this EntityQuery.

Remarks

Obsolete. Use EntityQuery.CompareQuery instead.
Compares a list of component types to the types defining this EntityQuery. Only required types in the query are used as the basis for the comparison. If you include types that the query excludes or only includes as optional, the comparison returns false.

CompareComponents(NativeArray<ComponentType>)

Obsolete. Use EntityQuery.CompareQuery instead.
警告
Deprecated. Use CompareQuery(in EntityQueryBuilder queryDesc) instead. (RemovedAfter Entities 1.0)
public bool CompareComponents(NativeArray<ComponentType> componentTypes)

Parameters

An array of ComponentType objects.

Returns

Type

Description

boolTrue, if the list of types, including any read/write access specifiers, matches the list of required component types of this EntityQuery.

Remarks

Obsolete. Use EntityQuery.CompareQuery instead.
Compares a list of component types to the types defining this EntityQuery. Only required types in the query are used as the basis for the comparison. If you include types that the query excludes or only includes as optional, the comparison returns false. Do not include the Entity type, which is included implicitly.