Method SetComponentEnabled
SetComponentEnabled<T>(Entity, bool)
Sets the enabled value of the component on the Entity.
Declaration
public void SetComponentEnabled<T>(Entity entity, bool enabled) where T : struct, IEnableableComponent
Parameters
Type | Name | Description |
---|---|---|
Entity | entity | The Entity to set the component to |
bool | enabled | True if the specified component should be enabled, or false if it should be disabled |
Type Parameters
Name | Description |
---|---|
T | The type of component to set |
Remarks
This method can only be invoked if the same baker instance previously added this specific component.
SetComponentEnabled<T>(bool)
Sets the enabled value of the component on the primary Entity.
Declaration
[Obsolete("Use the version of the function with the explicit Entity parameter (RemovedAfter Entities 1.0)")]
public void SetComponentEnabled<T>(bool enabled) where T : struct, IEnableableComponent
Parameters
Type | Name | Description |
---|---|---|
bool | enabled | True if the specified component should be enabled, or false if it should be disabled |
Type Parameters
Name | Description |
---|---|
T | The type of component to set |
Remarks
Implicitly it will access the primary entity with TransformUsageFlags.Dynamic.