Documentation

Unity Engine


Unity Engine


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

entity

The entity.

localPosition

The position relative to the parent, or to the world if the entity has no parent.

localRotation

The rotation relative to the parent, or to the world if the entity has no parent.

localScale

The scale relative to the parent, or to the world if the entity has no parent.

Returns

Type

Description

TransformRefA 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

entity

The entity.

localPosition

The position relative to the parent, or to the world if the entity has no parent.

localRotation

The rotation relative to the parent, or to the world if the entity has no parent.

Returns

Type

Description

TransformRefA 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

entity

The entity.

localPosition

The position relative to the parent, or to the world if the entity has no parent.

Returns

Type

Description

TransformRefA reference to the new transform.

AddTransform(Entity)

Adds a transform to an entity.
public TransformRef AddTransform(Entity entity)

Parameters

entity

The entity.

Returns

Type

Description

TransformRefA reference to the new transform.