Method IsComponentEnabled
IsComponentEnabled<T>(ref ComponentTypeHandle<T>, int)
Checks whether a given IComponent
Declaration
public readonly bool IsComponentEnabled<T>(ref ComponentTypeHandle<T> typeHandle, int entityIndexInChunk) where T : IComponentData, IEnableableComponent, new()
Parameters
Type | Name | Description |
---|---|---|
Component |
typeHandle | A type handle for the component type that will be queried. |
int | entityIndexInChunk | The index within this chunk of the entity whose component should be checked. |
Returns
Type | Description |
---|---|
bool | True if the specified component is enabled, or false if it is disabled. Also returns false if the |
Type Parameters
Name | Description |
---|---|
T | The component type whose enabled status should be checked. This type must implement the
IEnableable |
Exceptions
Type | Condition |
---|---|
Argument |
The Entity does not exist. |
See Also
IsComponentEnabled<T>(ComponentTypeHandle<T>, int)
Obsolete. Use Is
Declaration
[Obsolete("The typeHandle argument should now be passed by ref. (RemovedAfter Entities 1.0)", false)]
public readonly bool IsComponentEnabled<T>(ComponentTypeHandle<T> typeHandle, int entityIndexInChunk) where T : IComponentData, IEnableableComponent, new()
Parameters
Type | Name | Description |
---|---|---|
Component |
typeHandle | A type handle for the component type that will be queried. |
int | entityIndexInChunk | The index within this chunk of the entity whose component should be checked. |
Returns
Type | Description |
---|---|
bool | True if the specified component is enabled, or false if it is disabled. Also returns false if the |
Type Parameters
Name | Description |
---|---|
T | The component type whose enabled status should be checked. This type must implement the
IEnableable |
IsComponentEnabled<T>(ref BufferTypeHandle<T>, int)
Checks whether a given IBuffer
Declaration
public readonly bool IsComponentEnabled<T>(ref BufferTypeHandle<T> bufferTypeHandle, int entityIndexInChunk) where T : unmanaged, IBufferElementData, IEnableableComponent
Parameters
Type | Name | Description |
---|---|---|
Buffer |
bufferTypeHandle | A type handle for the component type that will be queried. |
int | entityIndexInChunk | The index within this chunk of the entity whose component should be checked. |
Returns
Type | Description |
---|---|
bool | True if the specified buffer component is enabled, or false if it is disabled. Also returns false if the |
Type Parameters
Name | Description |
---|---|
T | The buffer component type whose enabled status should be checked. This type must implement the
IEnableable |
Exceptions
Type | Condition |
---|---|
Argument |
The Entity does not exist. |
See Also
IsComponentEnabled<T>(BufferTypeHandle<T>, int)
Obsolete. Use Is
Declaration
[Obsolete("The bufferTypeHandle argument should now be passed by ref. (RemovedAfter Entities 1.0)", false)]
public readonly bool IsComponentEnabled<T>(BufferTypeHandle<T> bufferTypeHandle, int entityIndexInChunk) where T : unmanaged, IBufferElementData, IEnableableComponent
Parameters
Type | Name | Description |
---|---|---|
Buffer |
bufferTypeHandle | A type handle for the component type that will be queried. |
int | entityIndexInChunk | The index within this chunk of the entity whose component should be checked. |
Returns
Type | Description |
---|---|
bool | True if the specified buffer component is enabled, or false if it is disabled. Also returns false if the |
Type Parameters
Name | Description |
---|---|
T | The buffer component type whose enabled status should be checked. This type must implement the
IEnableable |
IsComponentEnabled(ref DynamicComponentTypeHandle, int)
Checks whether a given IBuffer
Declaration
public readonly bool IsComponentEnabled(ref DynamicComponentTypeHandle typeHandle, int entityIndexInChunk)
Parameters
Type | Name | Description |
---|---|---|
Dynamic |
typeHandle | A type handle for the component type that will be queried. |
int | entityIndexInChunk | The index within this chunk of the entity whose component should be checked. |
Returns
Type | Description |
---|---|
bool | True if the specified buffer component is enabled, or false if it is disabled. Also returns false if the |
Exceptions
Type | Condition |
---|---|
Argument |
The Entity does not exist. |