Transform
class in UnityEngine · UnityEngine.CoreModule · inherits from Component
Position, rotation, scale and hierarchy. World-space values come from the native world, which caches world matrices and recomputes them lazily. Verified against Unity in conformance/recordings/transform_world.jsonl.
Properties 16
int childCount { get; }Vector3 eulerAngles { get; set; }Vector3 forward { get; set; }Vector3 localEulerAngles { get; set; }Vector3 localPosition { get; set; }Quaternion localRotation { get; set; }Vector3 localScale { get; set; }Matrix4x4 localToWorldMatrix { get; }Vector3 lossyScale { get; }World scale; approximate when a parent is rotated and non-uniformly scaled.
Transform? parent { get; set; }Vector3 position { get; set; }Vector3 right { get; set; }Transform root { get; }Quaternion rotation { get; set; }Vector3 up { get; set; }Matrix4x4 worldToLocalMatrix { get; }Methods 24
void DetachChildren()Unparents every child, keeping where they are in the world.
Transform? Find(string n)A descendant by path of child names ("Arm/Hand"), first match at each level; null if there's none.
Transform GetChild(int index)IEnumerator GetEnumerator()void GetLocalPositionAndRotation(out Vector3 localPosition, out Quaternion localRotation)void GetPositionAndRotation(out Vector3 position, out Quaternion rotation)int GetSiblingIndex()Position among the parent's children (or among the scene's roots).
Vector3 InverseTransformDirection(Vector3 direction)Vector3 InverseTransformDirection(float x, float y, float z)Vector3 InverseTransformPoint(Vector3 position)Vector3 InverseTransformPoint(float x, float y, float z)Vector3 InverseTransformVector(Vector3 vector)Vector3 InverseTransformVector(float x, float y, float z)bool IsChildOf(Transform parent)void LookAt(Transform target)void LookAt(Transform target, Vector3 worldUp)void LookAt(Vector3 worldPosition)void LookAt(Vector3 worldPosition, Vector3 worldUp)void Rotate(Vector3 eulers)void Rotate(Vector3 eulers, Space relativeTo)void Rotate(float xAngle, float yAngle, float zAngle)void Rotate(float xAngle, float yAngle, float zAngle, Space relativeTo)void Rotate(Vector3 axis, float angle)void Rotate(Vector3 axis, float angle, Space relativeTo)void RotateAround(Vector3 point, Vector3 axis, float angle)Rotates around a world-space pivot, moving the position too.
void SetAsFirstSibling()void SetAsLastSibling()void SetLocalPositionAndRotation(Vector3 localPosition, Quaternion localRotation)void SetParent(Transform? parent)void SetParent(Transform? parent, bool worldPositionStays)Reparents. With worldPositionStays, the local transform is recomputed so the world pose stays the same.
void SetPositionAndRotation(Vector3 position, Quaternion rotation)void SetSiblingIndex(int index)Moves it to index among its siblings (clamped), which changes draw order in UI.
Vector3 TransformDirection(Vector3 direction)Vector3 TransformDirection(float x, float y, float z)Rotation only: unaffected by scale.
Vector3 TransformVector(Vector3 vector)Vector3 TransformVector(float x, float y, float z)Rotation and scale, no translation.
void Translate(Vector3 translation)void Translate(Vector3 translation, Space relativeTo)void Translate(float x, float y, float z)void Translate(float x, float y, float z, Space relativeTo)void Translate(Vector3 translation, Transform? relativeTo)void Translate(float x, float y, float z, Transform? relativeTo)Not in Tassix yet 9
InverseTransformDirections InverseTransformPoints InverseTransformVectors TransformDirections TransformPoints TransformVectors hasChanged hierarchyCapacity hierarchyCount
Checked against Unity
Conformance scenarios that exercise it, recorded in Unity and compared event by event.