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

ArchetypeChunk.IsComponentEnabled

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 IsComponentEnabled(ref ComponentTypeHandle`1 typeHandle, int entityIndexInChunk);

Parameters

Parameter Description
typeHandle A type handle for the component type that will be queried.
entityIndexInChunk The index within this chunk of the entity whose component should be checked.

Returns

bool True if the specified component is enabled, or false if it is disabled. Also returns false if the T is not present in this chunk.

Description

Checks whether a given IComponentData is enabled on the specified Entity. For the purposes of EntityQuery matching, an entity with a disabled component will behave as if it does not have that component.

Additional resources: ArchetypeChunk.SetComponentEnabled


Declaration

public bool IsComponentEnabled(ref BufferTypeHandle`1 bufferTypeHandle, int entityIndexInChunk);

Parameters

Parameter Description
bufferTypeHandle A type handle for the component type that will be queried.
entityIndexInChunk The index within this chunk of the entity whose component should be checked.

Returns

bool True if the specified buffer component is enabled, or false if it is disabled. Also returns false if the T is not present in this chunk.

Description

Checks whether a given IBufferElementData is enabled on the specified Entity. For the purposes of EntityQuery matching, an entity with a disabled component will behave as if it does not have that component.

Additional resources: ArchetypeChunk.SetComponentEnabled


Declaration

public bool IsComponentEnabled(ref DynamicComponentTypeHandle typeHandle, int entityIndexInChunk);

Parameters

Parameter Description
typeHandle A type handle for the component type that will be queried.
entityIndexInChunk The index within this chunk of the entity whose component should be checked.

Returns

bool True if the specified buffer component is enabled, or false if it is disabled. Also returns false if the T is not present in this chunk.

Description

Checks whether a given IBufferElementData is enabled on the specified Entity. For the purposes of EntityQuery matching, an entity with a disabled component will behave as if it does not have that component.

Additional resources: ArchetypeChunk.SetComponentEnabled