AddComponentData<T>(Entity, T)
Adds a component to an entity and sets its value.
Read time 1 minuteLast updated a day ago
Definition
- Type: Method
- Namespace: Unity.Entities
- Assembly: UnityEngine.EntitiesModule
public static bool AddComponentData<T>(Entity entity, T componentData) where T : unmanaged, IComponentData
Parameters
Returns
Type | Description |
|---|---|
| bool | False if the entity already had the component, in which case only its value is set. |
Remarks
This is a structural change.