AddTransform
Adds a transform to an entity.
Read time 1 minuteLast updated a day ago
Definition
- Type: Method
- Namespace: Unity.Entities
- Assembly: UnityEngine.EntitiesModule
AddTransform(Entity, float3, quaternion, float3)
Adds a transform to an entity.
public TransformRef AddTransform(Entity entity, float3 localPosition, quaternion localRotation, float3 localScale)
Parameters
The entity.
The position relative to the parent, or to the world if the entity has no parent.
The rotation relative to the parent, or to the world if the entity has no parent.
The scale relative to the parent, or to the world if the entity has no parent.
Returns
Type | Description |
|---|---|
| TransformRef | A reference to the new transform. |
AddTransform(Entity, float3, quaternion)
Adds a transform with a scale of one to an entity.
public TransformRef AddTransform(Entity entity, float3 localPosition, quaternion localRotation)
Parameters
The entity.
The position relative to the parent, or to the world if the entity has no parent.
The rotation relative to the parent, or to the world if the entity has no parent.
Returns
Type | Description |
|---|---|
| TransformRef | A reference to the new transform. |
AddTransform(Entity, float3)
Adds a transform with no rotation and a scale of one to an entity.
public TransformRef AddTransform(Entity entity, float3 localPosition)
Parameters
Returns
Type | Description |
|---|---|
| TransformRef | A reference to the new transform. |
AddTransform(Entity)
Adds a transform to an entity.
public TransformRef AddTransform(Entity entity)
Parameters
The entity.
Returns
Type | Description |
|---|---|
| TransformRef | A reference to the new transform. |