Version: Unity 7.0 Alpha (7000.0)
LanguageEnglish
  • C#

TransformRef

struct in Unity.Entities


Implements interfaces:IQueryTypeParameter

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

A reference to the transform of an entity, which can be part of a transform hierarchy.

Properties

Property Description
HasHierarchy Returns whether this transform is currently part of a hierarchy.
IsValid Whether this reference points to a transform.
LocalPosition The position relative to the parent, or to the world if the transform has no parent.
LocalRotation The rotation relative to the parent, or to the world if the transform has no parent.
LocalScale The scale relative to the parent, or to the world if the transform has no parent.

Public Methods

Method Description
ComputeLocalToWorld Computes the matrix that transforms from this transform's local space to world space.
GetChild Gets the child entity at the specified index.
GetChildCount Gets the number of direct children of this transform.
GetChildEntities Gets all child entities.
GetLocalPositionAndRotation Gets the local (parent-relative) position and rotation.
GetParent Gets the parent entity of this transform.
GetWorldPositionAndRotation Gets the world-space position and rotation.
SetLocalPositionAndRotation Sets the local (parent-relative) position and rotation to the provided values.
SetLocalTransform Sets the local (parent-relative) position, rotation, and scale to the values encoded in a 4x4 local-to-parent matrix.
SetWorldPositionAndRotation Sets the world-space position and rotation to the provided values.