# Transform

> Position, rotation and scale of an object.

## Definition

* **Type:** Class
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule
* **Inherits from:** [Component](/engine/6000.7/script-reference/unityengine/component.md)
* **Implements:** [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.ienumerable)

```csharp
public class Transform : Component, IEnumerable
```

## Remarks

Every object in a Scene has a Transform. It's used to store and manipulate the position, rotation and scale of the object. Every Transform can have a parent, which allows you to apply position, rotation and scale hierarchically. This is the hierarchy seen in the Hierarchy pane. They also support enumerators so you can loop through children using:

```csharp
using UnityEngine;

public class Example : MonoBehaviour
{
    // Moves all transform children 10 units upwards!
    void Start()
    {
        foreach (Transform child in transform)
        {
            child.position += Vector3.up * 10.0f;
        }
    }
}
```

Additional Resources: [The component reference](/engine/6000.7/manual/working-with-gameobjects/gameobject-fundamentals/class-transform.md), [Physics](/engine/6000.7/script-reference/unityengine/physics.md) class.

## Properties

| Property                                                                                          | Description                                                                                                                         |
| ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| [childCount](/engine/6000.7/script-reference/unityengine/transform/childcount.md)                 | The number of children the parent Transform has.                                                                                    |
| [eulerAngles](/engine/6000.7/script-reference/unityengine/transform/eulerangles.md)               | The rotation as Euler angles in degrees.                                                                                            |
| [forward](/engine/6000.7/script-reference/unityengine/transform/forward.md)                       | Returns a normalized vector representing the blue axis of the transform in world space.                                             |
| [hasChanged](/engine/6000.7/script-reference/unityengine/transform/haschanged.md)                 | Has the transform changed since the last time the flag was set to 'false'?                                                          |
| [hierarchyCapacity](/engine/6000.7/script-reference/unityengine/transform/hierarchycapacity.md)   | The transform capacity of the transform's hierarchy data structure.                                                                 |
| [hierarchyCount](/engine/6000.7/script-reference/unityengine/transform/hierarchycount.md)         | The number of transforms in the transform's hierarchy data structure.                                                               |
| [localEulerAngles](/engine/6000.7/script-reference/unityengine/transform/localeulerangles.md)     | The rotation as Euler angles in degrees relative to the parent transform's rotation.                                                |
| [localPosition](/engine/6000.7/script-reference/unityengine/transform/localposition.md)           | Position of the transform relative to the parent transform.                                                                         |
| [localRotation](/engine/6000.7/script-reference/unityengine/transform/localrotation.md)           | The rotation of the transform relative to the transform rotation of the parent.                                                     |
| [localScale](/engine/6000.7/script-reference/unityengine/transform/localscale.md)                 | The scale of the transform relative to the GameObjects parent.                                                                      |
| [localToWorldMatrix](/engine/6000.7/script-reference/unityengine/transform/localtoworldmatrix.md) | Matrix that transforms a point from local space into world space (Read Only).                                                       |
| [lossyScale](/engine/6000.7/script-reference/unityengine/transform/lossyscale.md)                 | The global scale of the object (Read Only).                                                                                         |
| [parent](/engine/6000.7/script-reference/unityengine/transform/parent.md)                         | The parent of the transform.                                                                                                        |
| [position](/engine/6000.7/script-reference/unityengine/transform/position.md)                     | The world space position of the Transform.                                                                                          |
| [right](/engine/6000.7/script-reference/unityengine/transform/right.md)                           | The red axis of the transform in world space.                                                                                       |
| [root](/engine/6000.7/script-reference/unityengine/transform/root.md)                             | Returns the topmost transform in the hierarchy.                                                                                     |
| [rotation](/engine/6000.7/script-reference/unityengine/transform/rotation.md)                     | A [Quaternion](/engine/6000.7/script-reference/unityengine/quaternion.md) that stores the rotation of the Transform in world space. |
| [up](/engine/6000.7/script-reference/unityengine/transform/up.md)                                 | The green axis of the transform in world space.                                                                                     |
| [worldToLocalMatrix](/engine/6000.7/script-reference/unityengine/transform/worldtolocalmatrix.md) | Matrix that transforms a point from world space into local space (Read Only).                                                       |

## Methods

| Method                                                                                                              | Description                                                                                                                                                                                                                                                       |
| ------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [DetachChildren](/engine/6000.7/script-reference/unityengine/transform/detachchildren.md)                           | Unparents all of the target object's children.                                                                                                                                                                                                                    |
| [Find](/engine/6000.7/script-reference/unityengine/transform/find.md)                                               | Finds a child by name `n` and returns it.                                                                                                                                                                                                                         |
| [GetChild](/engine/6000.7/script-reference/unityengine/transform/getchild.md)                                       | Returns a transform child by index.                                                                                                                                                                                                                               |
| [GetLocalPositionAndRotation](/engine/6000.7/script-reference/unityengine/transform/getlocalpositionandrotation.md) | Updates the value of the out parameters `localPosition` and `localRotation` with the transform's current `position` and `rotation` in local space (that is, relative to its parent's `transform`).                                                                |
| [GetPositionAndRotation](/engine/6000.7/script-reference/unityengine/transform/getpositionandrotation.md)           | Updates the value of the out parameters `position` and `rotation` with the transform's current `position` and `rotation` in world space (that is, relative to the scene's origin coordinates).                                                                    |
| [GetSiblingIndex](/engine/6000.7/script-reference/unityengine/transform/getsiblingindex.md)                         | Gets the index of this Transform, relative to its siblings.                                                                                                                                                                                                       |
| [InverseTransformDirection](/engine/6000.7/script-reference/unityengine/transform/inversetransformdirection.md)     | Transforms the direction `x`, `y`, `z` from world space to local space. The opposite of [Transform.TransformDirection](/engine/6000.7/script-reference/unityengine/transform/transformdirection.md).                                                              |
| [InverseTransformDirections](/engine/6000.7/script-reference/unityengine/transform/inversetransformdirections.md)   | Transforms multiple directions from world space to local space writing the transformed positions to a possibly different location. The opposite of [Transform.TransformDirections](/engine/6000.7/script-reference/unityengine/transform/transformdirections.md). |
| [InverseTransformPoint](/engine/6000.7/script-reference/unityengine/transform/inversetransformpoint.md)             | Transforms the position `x`, `y`, `z` from world space to local space.                                                                                                                                                                                            |
| [InverseTransformPoints](/engine/6000.7/script-reference/unityengine/transform/inversetransformpoints.md)           | Transforms multiple positions from world space to local space writing the transformed positions to a possibly different location.                                                                                                                                 |
| [InverseTransformVector](/engine/6000.7/script-reference/unityengine/transform/inversetransformvector.md)           | Transforms the vector `x`, `y`, `z` from world space to local space. The opposite of [Transform.TransformVector](/engine/6000.7/script-reference/unityengine/transform/transformvector.md).                                                                       |
| [InverseTransformVectors](/engine/6000.7/script-reference/unityengine/transform/inversetransformvectors.md)         | Transforms the vector `x`, `y`, `z` from world space to local space writing the transformed positions to a possibly different location. The opposite of [Transform.TransformVector](/engine/6000.7/script-reference/unityengine/transform/transformvector.md).    |
| [IsChildOf](/engine/6000.7/script-reference/unityengine/transform/ischildof.md)                                     | Is this transform a child of parent?                                                                                                                                                                                                                              |
| [LookAt](/engine/6000.7/script-reference/unityengine/transform/lookat.md)                                           | Rotates the transform so the forward vector points at target's current position.                                                                                                                                                                                  |
| [Rotate](/engine/6000.7/script-reference/unityengine/transform/rotate.md)                                           | The implementation of this method applies a rotation of `zAngle` degrees around the z axis, `xAngle` degrees around the x axis, and `yAngle` degrees around the y axis (in that order).                                                                           |
| [RotateAround](/engine/6000.7/script-reference/unityengine/transform/rotatearound.md)                               | Rotates the transform about `axis` passing through `point` in world coordinates by `angle` degrees.                                                                                                                                                               |
| [SetAsFirstSibling](/engine/6000.7/script-reference/unityengine/transform/setasfirstsibling.md)                     | Move the transform to the start of the local transform list.                                                                                                                                                                                                      |
| [SetAsLastSibling](/engine/6000.7/script-reference/unityengine/transform/setaslastsibling.md)                       | Move the transform to the end of the local transform list.                                                                                                                                                                                                        |
| [SetLocalPositionAndRotation](/engine/6000.7/script-reference/unityengine/transform/setlocalpositionandrotation.md) | Sets the position and rotation of the Transform component in local space (i.e. relative to its parent transform).                                                                                                                                                 |
| [SetParent](/engine/6000.7/script-reference/unityengine/transform/setparent.md)                                     | Set the parent of the transform.                                                                                                                                                                                                                                  |
| [SetPositionAndRotation](/engine/6000.7/script-reference/unityengine/transform/setpositionandrotation.md)           | Sets the world space position and rotation of the Transform component.                                                                                                                                                                                            |
| [SetSiblingIndex](/engine/6000.7/script-reference/unityengine/transform/setsiblingindex.md)                         | Sets the sibling index.                                                                                                                                                                                                                                           |
| [TransformDirection](/engine/6000.7/script-reference/unityengine/transform/transformdirection.md)                   | Transforms direction `x`, `y`, `z` from local space to world space.                                                                                                                                                                                               |
| [TransformDirections](/engine/6000.7/script-reference/unityengine/transform/transformdirections.md)                 | Transforms multiple directions from local space to world space writing the transformed directions to a possibly different location.                                                                                                                               |
| [TransformPoint](/engine/6000.7/script-reference/unityengine/transform/transformpoint.md)                           | Transforms the position `x`, `y`, `z` from local space to world space.                                                                                                                                                                                            |
| [TransformPoints](/engine/6000.7/script-reference/unityengine/transform/transformpoints.md)                         | Transforms multiple points from local space to world space writing the transformed points to a possibly different location.                                                                                                                                       |
| [TransformVector](/engine/6000.7/script-reference/unityengine/transform/transformvector.md)                         | Transforms vector `x`, `y`, `z` from local space to world space.                                                                                                                                                                                                  |
| [TransformVectors](/engine/6000.7/script-reference/unityengine/transform/transformvectors.md)                       | Transforms multiple vectors from local space to world space writing the transformed versions to a possibly different location.                                                                                                                                    |
| [Translate](/engine/6000.7/script-reference/unityengine/transform/translate.md)                                     | Moves the transform by x along the x axis, y along the y axis, and z along the z axis.                                                                                                                                                                            |

## Inheritance

**Inherited Members:**

* [Component.GetComponent(Type)](/engine/6000.7/script-reference/unityengine/component/getcomponent.md#getcomponent\(type\))
* [Component.GetComponent\<T>()](/engine/6000.7/script-reference/unityengine/component/getcomponent.md)
* [Component.TryGetComponent(Type, Component)](/engine/6000.7/script-reference/unityengine/component/trygetcomponent.md)
* [Component.TryGetComponent\<T>(T)](/engine/6000.7/script-reference/unityengine/component/trygetcomponent.md)
* [Component.GetComponent(string)](/engine/6000.7/script-reference/unityengine/component/getcomponent.md#getcomponent\(string\))
* [Component.GetComponentInChildren(Type, bool)](/engine/6000.7/script-reference/unityengine/component/getcomponentinchildren.md#getcomponentinchildren\(type-bool\))
* [Component.GetComponentInChildren(Type)](/engine/6000.7/script-reference/unityengine/component/getcomponentinchildren.md#getcomponentinchildren\(type\))
* [Component.GetComponentInChildren\<T>(bool)](/engine/6000.7/script-reference/unityengine/component/getcomponentinchildren.md)
* [Component.GetComponentsInChildren(Type, bool)](/engine/6000.7/script-reference/unityengine/component/getcomponentsinchildren.md)
* [Component.GetComponentsInChildren\<T>(bool)](/engine/6000.7/script-reference/unityengine/component/getcomponentsinchildren.md#getcomponentsinchildrent\(bool\))
* [Component.GetComponentsInChildren\<T>(bool, List\<T>)](/engine/6000.7/script-reference/unityengine/component/getcomponentsinchildren.md)
* [Component.GetComponentsInChildren\<T>()](/engine/6000.7/script-reference/unityengine/component/getcomponentsinchildren.md#getcomponentsinchildrent\(\))
* [Component.GetComponentsInChildren\<T>(List\<T>)](/engine/6000.7/script-reference/unityengine/component/getcomponentsinchildren.md)
* [Component.GetComponentInParent(Type, bool)](/engine/6000.7/script-reference/unityengine/component/getcomponentinparent.md#getcomponentinparent\(type-bool\))
* [Component.GetComponentInParent(Type)](/engine/6000.7/script-reference/unityengine/component/getcomponentinparent.md#getcomponentinparent\(type\))
* [Component.GetComponentInParent\<T>(bool)](/engine/6000.7/script-reference/unityengine/component/getcomponentinparent.md#getcomponentinparentt\(bool\))
* [Component.GetComponentInParent\<T>()](/engine/6000.7/script-reference/unityengine/component/getcomponentinparent.md#getcomponentinparentt\(\))
* [Component.GetComponentsInParent(Type, bool)](/engine/6000.7/script-reference/unityengine/component/getcomponentsinparent.md)
* [Component.GetComponentsInParent\<T>(bool)](/engine/6000.7/script-reference/unityengine/component/getcomponentsinparent.md#getcomponentsinparentt\(bool\))
* [Component.GetComponentsInParent\<T>(bool, List\<T>)](/engine/6000.7/script-reference/unityengine/component/getcomponentsinparent.md)
* [Component.GetComponentsInParent\<T>()](/engine/6000.7/script-reference/unityengine/component/getcomponentsinparent.md#getcomponentsinparentt\(\))
* [Component.GetComponents(Type)](/engine/6000.7/script-reference/unityengine/component/getcomponents.md#getcomponents\(type\))
* [Component.GetComponents(Type, List\<Component>)](/engine/6000.7/script-reference/unityengine/component/getcomponents.md#getcomponents\(type-listcomponent\))
* [Component.GetComponents\<T>(List\<T>)](/engine/6000.7/script-reference/unityengine/component/getcomponents.md)
* [Component.GetComponents\<T>()](/engine/6000.7/script-reference/unityengine/component/getcomponents.md#getcomponentst\(\))
* [Component.GetComponentIndex()](/engine/6000.7/script-reference/unityengine/component/getcomponentindex.md)
* [Component.CompareTag(string)](/engine/6000.7/script-reference/unityengine/component/comparetag.md#comparetag\(string\))
* [Component.CompareTag(TagHandle)](/engine/6000.7/script-reference/unityengine/component/comparetag.md#comparetag\(taghandle\))
* [Component.SendMessageUpwards(string, Object, SendMessageOptions)](/engine/6000.7/script-reference/unityengine/component/sendmessageupwards.md#sendmessageupwards\(string-object-sendmessageoptions\))
* [Component.SendMessageUpwards(string, SendMessageOptions)](/engine/6000.7/script-reference/unityengine/component/sendmessageupwards.md#sendmessageupwards\(string-sendmessageoptions\))
* [Component.SendMessage(string, Object)](/engine/6000.7/script-reference/unityengine/component/sendmessage.md#sendmessage\(string-object\))
* [Component.SendMessage(string)](/engine/6000.7/script-reference/unityengine/component/sendmessage.md#sendmessage\(string\))
* [Component.SendMessage(string, Object, SendMessageOptions)](/engine/6000.7/script-reference/unityengine/component/sendmessage.md#sendmessage\(string-object-sendmessageoptions\))
* [Component.SendMessage(string, SendMessageOptions)](/engine/6000.7/script-reference/unityengine/component/sendmessage.md#sendmessage\(string-sendmessageoptions\))
* [Component.BroadcastMessage(string, Object, SendMessageOptions)](/engine/6000.7/script-reference/unityengine/component/broadcastmessage.md#broadcastmessage\(string-object-sendmessageoptions\))
* [Component.BroadcastMessage(string, SendMessageOptions)](/engine/6000.7/script-reference/unityengine/component/broadcastmessage.md#broadcastmessage\(string-sendmessageoptions\))
* [Component.transform](/engine/6000.7/script-reference/unityengine/component/transform.md)
* [Component.transformHandle](/engine/6000.7/script-reference/unityengine/component/transformhandle.md)
* [Component.gameObject](/engine/6000.7/script-reference/unityengine/component/gameobject.md)
* [Component.tag](/engine/6000.7/script-reference/unityengine/component/tag.md)
* [Object.GetEntityId()](/engine/6000.7/script-reference/unityengine/object/getentityid.md)
* [Object.GetHashCode()](/engine/6000.7/script-reference/unityengine/object/gethashcode.md)
* [Object.InstantiateAsync\<T>(T)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, Transform)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, Vector3, Quaternion)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, Transform, Vector3, Quaternion)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Vector3, Quaternion)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, ReadOnlySpan\<Vector3>, ReadOnlySpan\<Quaternion>)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform, Vector3, Quaternion)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform, Vector3, Quaternion, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform, ReadOnlySpan\<Vector3>, ReadOnlySpan\<Quaternion>)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Transform, ReadOnlySpan\<Vector3>, ReadOnlySpan\<Quaternion>, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, InstantiateParameters, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, InstantiateParameters, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, Vector3, Quaternion, InstantiateParameters, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, Vector3, Quaternion, InstantiateParameters, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.InstantiateAsync\<T>(T, int, ReadOnlySpan\<Vector3>, ReadOnlySpan\<Quaternion>, InstantiateParameters, CancellationToken)](/engine/6000.7/script-reference/unityengine/object/instantiateasync.md)
* [Object.Instantiate(Object, Vector3, Quaternion)](/engine/6000.7/script-reference/unityengine/object/instantiate.md#instantiate\(object-vector3-quaternion\))
* [Object.Instantiate(Object, Vector3, Quaternion, Transform)](/engine/6000.7/script-reference/unityengine/object/instantiate.md#instantiate\(object-vector3-quaternion-transform\))
* [Object.Instantiate(Object)](/engine/6000.7/script-reference/unityengine/object/instantiate.md#instantiate\(object\))
* [Object.Instantiate(Object, Scene)](/engine/6000.7/script-reference/unityengine/object/instantiate.md#instantiate\(object-scene\))
* [Object.Instantiate\<T>(T, InstantiateParameters)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Vector3, Quaternion, InstantiateParameters)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate(Object, Transform)](/engine/6000.7/script-reference/unityengine/object/instantiate.md#instantiate\(object-transform\))
* [Object.Instantiate(Object, Transform, bool)](/engine/6000.7/script-reference/unityengine/object/instantiate.md#instantiate\(object-transform-bool\))
* [Object.Instantiate\<T>(T)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Vector3, Quaternion)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Vector3, Quaternion, Transform)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Transform)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Instantiate\<T>(T, Transform, bool)](/engine/6000.7/script-reference/unityengine/object/instantiate.md)
* [Object.Destroy(Object, float)](/engine/6000.7/script-reference/unityengine/object/destroy.md)
* [Object.DestroyImmediate(Object, bool)](/engine/6000.7/script-reference/unityengine/object/destroyimmediate.md)
* [Object.FindObjectsByType(Type)](/engine/6000.7/script-reference/unityengine/object/findobjectsbytype.md#findobjectsbytype\(type\))
* [Object.FindObjectsByType(Type, FindObjectsInactive)](/engine/6000.7/script-reference/unityengine/object/findobjectsbytype.md#findobjectsbytype\(type-findobjectsinactive\))
* [Object.DontDestroyOnLoad(Object)](/engine/6000.7/script-reference/unityengine/object/dontdestroyonload.md)
* [Object.FindAnyObjectByType\<T>()](/engine/6000.7/script-reference/unityengine/object/findanyobjectbytype.md#findanyobjectbytypet\(\))
* [Object.FindAnyObjectByType\<T>(FindObjectsInactive)](/engine/6000.7/script-reference/unityengine/object/findanyobjectbytype.md#findanyobjectbytypet\(findobjectsinactive\))
* [Object.FindObjectsByType\<T>()](/engine/6000.7/script-reference/unityengine/object/findobjectsbytype.md#findobjectsbytypet\(\))
* [Object.FindObjectsByType\<T>(FindObjectsInactive)](/engine/6000.7/script-reference/unityengine/object/findobjectsbytype.md#findobjectsbytypet\(findobjectsinactive\))
* [Object.FindAnyObjectByType(Type)](/engine/6000.7/script-reference/unityengine/object/findanyobjectbytype.md#findanyobjectbytype\(type\))
* [Object.FindAnyObjectByType(Type, FindObjectsInactive)](/engine/6000.7/script-reference/unityengine/object/findanyobjectbytype.md#findanyobjectbytype\(type-findobjectsinactive\))
* [Object.ToString()](/engine/6000.7/script-reference/unityengine/object/tostring.md)
* [Object.name](/engine/6000.7/script-reference/unityengine/object/name.md)
* [Object.hideFlags](/engine/6000.7/script-reference/unityengine/object/hideflags.md)

### Operators

| Operator                                                                           | Description                                                             |
| ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| [operator ==](/engine/6000.7/script-reference/unityengine/object/op-equality.md)   | Compares two object references to see if they refer to the same object. |
| [bool](/engine/6000.7/script-reference/unityengine/object/op-implicit.md)          | Determines whether the object exists.                                   |
| [operator !=](/engine/6000.7/script-reference/unityengine/object/op-inequality.md) | Compares if two objects refer to a different object.                    |
