RemoveComponent
Removes a component from an entity.
読み終わるまでの所要時間 1 分最終更新 2日前
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.
RemoveComponent(Entity, ComponentTypeSet)
Removes components from an entity.
public static void RemoveComponent(Entity entity, in ComponentTypeSet types)
Parameters
Remarks
This is one structural change, however many types the set holds. Types the entity doesn't have are skipped.