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

ArchetypeChunk.Has

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 Has(ref ComponentTypeHandle`1 typeHandle);

Parameters

Parameter Description
typeHandle An object containing type and job safety information. To create this object, call ComponentSystemBase.GetComponentTypeHandle. Pass the object to a job using a public field you define as part of the job struct.

Returns

bool True, if this chunk contains an array of the specified component type.

Description

Reports whether this chunk contains the specified component type.

When an EntityQuery includes optional components (using EntityQueryBuilder.WithAny), some chunks returned by the query may contain such components and some may not. Use this function to determine whether or not the current chunk contains one of these optional component types.


Declaration

public bool Has();

Returns

bool True, if this chunk contains an array of the specified component type.

Description

Reports whether this chunk contains the specified component type.

When an EntityQuery includes optional components (using EntityQueryBuilder.WithAny), some chunks returned by the query may contain such components and some may not. Use this function to determine whether or not the current chunk contains one of these optional component types.


Declaration

public bool Has(ref DynamicComponentTypeHandle typeHandle);

Parameters

Parameter Description
typeHandle Type handle for the component type to query.

Returns

bool True, if this chunk contains an array of the specified component type.

Description

Reports whether this chunk contains the specified component type.


Declaration

public bool Has(ref TransformTypeHandle typeHandle);

Parameters

Parameter Description
typeHandle Type handle for the transform type.

Returns

bool True, if this chunk contains an array of transform component type.

Description

Reports whether this chunk contains the TransformRef type.


Declaration

public bool Has(SharedComponentTypeHandle<T> typeHandle);

Parameters

Parameter Description
typeHandle An object containing type and job safety information. To create this object, call ComponentSystemBase.GetSharedComponentTypeHandle. Pass the object to a job using a public field you define as part of the job struct.

Returns

bool True, if this chunk contains a shared component of the specified type.

Description

Reports whether this chunk contains a shared component of the specified component type.

When an EntityQuery includes optional components used as shared components (with EntityQueryBuilder.WithAny), some chunks returned by the query may have these shared components and some may not. Use this function to determine whether or not the current chunk contains one of these optional component types as a shared component.


Declaration

public bool Has(ref DynamicSharedComponentTypeHandle typeHandle);

Parameters

Parameter Description
typeHandle An object containing type and job safety information. To create this object, call ComponentSystemBase.GetDynamicSharedComponentTypeHandle.

Returns

bool True, if this chunk contains a shared component of the specified type.

Description

Reports whether this chunk contains a shared component of the specified component type.

When an EntityQuery includes optional components used as shared components (with EntityQueryBuilder.WithAny), some chunks returned by the query may have these shared components and some may not. Use this function to determine whether or not the current chunk contains one of these optional component types as a shared component.


Declaration

public bool Has(ref BufferTypeHandle`1 bufferTypeHandle);

Parameters

Parameter Description
bufferTypeHandle An object containing type and job safety information. To create this object, call ComponentSystemBase.GetBufferTypeHandle. Pass the object to a job using a public field you define as part of the job struct.

Returns

bool True, if this chunk contains an array of the dynamic buffers containing the specified component type.

Description

Reports whether this chunk contains a dynamic buffer containing the specified component type.

When an EntityQuery includes optional dynamic buffer types (with EntityQueryBuilder.WithAny), some chunks returned by the query may have these dynamic buffers components and some may not. Use this function to determine whether or not the current chunk contains one of these optional dynamic buffers.