RemoveComponent
Removes a component from an entity.
Read time 1 minuteLast updated a day ago
Definition
- Type: Method
- Namespace: Unity.Entities
- Assembly: UnityEngine.EntitiesModule
RemoveComponent<T>(Entity)
Removes a component from an entity.
public static bool RemoveComponent<T>(Entity entity)
Parameters
The entity.
Returns
Type | Description |
|---|---|
| bool | False if the entity didn't have the component. |
Remarks
This is a structural change.
RemoveComponent(Entity, ComponentType)
Removes a component from an entity.
public static bool RemoveComponent(Entity entity, ComponentType componentType)
Parameters
Returns
Type | Description |
|---|---|
| bool | False if the entity didn't have the component. |
Remarks
This is a structural change.