| Parameter | Description |
|---|---|
| e | The entity whose component should be enabled or disabled. |
| value | True if the specified component should be enabled, or false if it should be disabled. |
Records a command to enable or disable a ComponentType on the specified Entity. This operation does not cause a structural change, or affect the value of the component. For the purposes of EntityQuery matching, an entity with a disabled component will behave as if it does not have that component.
At playback, this command throws an error if this entity is destroyed before playback, if the entity has the Prefab tag, or if the entity doesn't have the component type.
| Parameter | Description |
|---|---|
| e | The entity whose component should be enabled or disabled. |
| componentType | The component type to enable or disable. This type must implement the IEnableableComponent interface. |
| value | True if the specified component should be enabled, or false if it should be disabled. |
Records a command to enable or disable a ComponentType on the specified Entity. This operation does not cause a structural change, or affect the value of the component. For the purposes of EntityQuery matching, an entity with a disabled component will behave as if it does not have that component.
At playback, this command throws an error if this entity is destroyed before playback, if the entity has the Prefab tag, or if the entity doesn't have the component type.