Method SetComponentEnabled
SetComponentEnabled<T>(Entity, bool)
Enable or disable the IComponent
Declaration
public static void SetComponentEnabled<T>(Entity entity, bool value) where T : unmanaged, IComponentData, IEnableableComponent
Parameters
Type | Name | Description |
---|---|---|
Entity | entity | The entity whose component should be enabled or disabled. |
bool | value | True if the specified component should be enabled, or false if it should be 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
SetComponentEnabled<T>(SystemHandle, bool)
Enable or disable the IComponent
Declaration
public static void SetComponentEnabled<T>(SystemHandle systemHandle, bool value) where T : unmanaged, IComponentData, IEnableableComponent
Parameters
Type | Name | Description |
---|---|---|
System |
systemHandle | The system whose component should be enabled or disabled. |
bool | value | True if the specified component should be enabled, or false if it should be 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 |