Method IsComponentEnabled
IsComponentEnabled<T>(Entity)
Checks whether the IComponent
Declaration
public static bool IsComponentEnabled<T>(Entity entity) where T : unmanaged, IComponentData, IEnableableComponent
Parameters
Type | Name | Description |
---|---|---|
Entity | entity | The entity whose component should be checked. |
Returns
Type | Description |
---|---|
bool | True if the specified component is enabled, or false if it is disabled. |
Type Parameters
Name | Description |
---|---|
T | An unmanaged IComponentData type |
Remarks
Not working in Entities.ForEach, IJobEntity, Utility methods, and Aspects
Exceptions
Type | Condition |
---|---|
Argument |
The Entity does not exist. |
See Also
IsComponentEnabled<T>(SystemHandle)
Checks whether the IComponent
Declaration
public static bool IsComponentEnabled<T>(SystemHandle systemHandle) where T : unmanaged, IComponentData, IEnableableComponent
Parameters
Type | Name | Description |
---|---|---|
System |
systemHandle | The system whose component should be checked. |
Returns
Type | Description |
---|---|
bool | True if the specified component is enabled, or false if it is disabled. |
Type Parameters
Name | Description |
---|---|
T | An unmanaged IComponentData type |
Remarks
Not working in Entities.ForEach, IJobEntity, Utility methods, and Aspects
Exceptions
Type | Condition |
---|---|
Argument |
The System |