Show / Hide Table of Contents

Class Transform

Inheritance
Object
Object
Component
Transform
RectTransform
Implements
IEnumerable
Inherited Members
Component.transform
Component.gameObject
Component.GetComponent(Type)
Component.GetComponent<T>()
Component.GetComponent(String)
Component.GetComponentInChildren(Type, Boolean)
Component.GetComponentInChildren(Type)
Component.GetComponentInChildren<T>(Boolean)
Component.GetComponentInChildren<T>()
Component.GetComponentsInChildren(Type, Boolean)
Component.GetComponentsInChildren(Type)
Component.GetComponentsInChildren<T>(Boolean)
Component.GetComponentsInChildren<T>(Boolean, List<T>)
Component.GetComponentsInChildren<T>()
Component.GetComponentsInChildren<T>(List<T>)
Component.GetComponentInParent(Type)
Component.GetComponentInParent<T>()
Component.GetComponentsInParent(Type, Boolean)
Component.GetComponentsInParent(Type)
Component.GetComponentsInParent<T>(Boolean)
Component.GetComponentsInParent<T>(Boolean, List<T>)
Component.GetComponentsInParent<T>()
Component.GetComponents(Type)
Component.GetComponents(Type, List<Component>)
Component.GetComponents<T>(List<T>)
Component.tag
Component.GetComponents<T>()
Component.CompareTag(String)
Component.SendMessageUpwards(String, Object, SendMessageOptions)
Component.SendMessageUpwards(String, Object)
Component.SendMessageUpwards(String)
Component.SendMessageUpwards(String, SendMessageOptions)
Component.SendMessage(String, Object)
Component.SendMessage(String)
Component.SendMessage(String, Object, SendMessageOptions)
Component.SendMessage(String, SendMessageOptions)
Component.BroadcastMessage(String, Object, SendMessageOptions)
Component.BroadcastMessage(String, Object)
Component.BroadcastMessage(String)
Component.BroadcastMessage(String, SendMessageOptions)
Object.GetInstanceID()
Object.GetHashCode()
Object.Equals(Object)
Object.name
Object.Instantiate(Object, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion, Transform)
Object.Instantiate(Object)
Object.Instantiate(Object, Transform)
Object.Instantiate(Object, Transform, Boolean)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.Instantiate<T>(T, Transform, Boolean)
Object.Destroy(Object, Single)
Object.Destroy(Object)
Object.DestroyImmediate(Object, Boolean)
Object.DestroyImmediate(Object)
Object.FindObjectsOfType(Type)
Object.DontDestroyOnLoad(Object)
Object.hideFlags
Object.DestroyObject(Object, Single)
Object.DestroyObject(Object)
Object.FindSceneObjectsOfType(Type)
Object.FindObjectsOfTypeIncludingAssets(Type)
Object.FindObjectsOfType<T>()
Object.FindObjectOfType<T>()
Object.FindObjectsOfTypeAll(Type)
Object.FindObjectOfType(Type)
Object.ToString()
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetType()
Object.MemberwiseClone()
Namespace: UnityEngine
Assembly: UnityEngine.dll
Syntax
public class Transform : Component, IEnumerable

Constructors

| Improve this Doc View Source

Transform()

Declaration
protected Transform()

Properties

childCount

Declaration
public int childCount { get; }
Property Value
Type Description
Int32
| Improve this Doc View Source

eulerAngles

Declaration
public Vector3 eulerAngles { get; set; }
Property Value
Type Description
Vector3
| Improve this Doc View Source

forward

Declaration
public Vector3 forward { get; set; }
Property Value
Type Description
Vector3

hasChanged

Declaration
public bool hasChanged { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

hierarchyCapacity

Declaration
public int hierarchyCapacity { get; set; }
Property Value
Type Description
Int32
| Improve this Doc View Source

hierarchyCount

Declaration
public int hierarchyCount { get; }
Property Value
Type Description
Int32
| Improve this Doc View Source

localEulerAngles

Declaration
public Vector3 localEulerAngles { get; set; }
Property Value
Type Description
Vector3

localPosition

Declaration
public Vector3 localPosition { get; set; }
Property Value
Type Description
Vector3

localRotation

Declaration
public Quaternion localRotation { get; set; }
Property Value
Type Description
Quaternion

localScale

Declaration
public Vector3 localScale { get; set; }
Property Value
Type Description
Vector3

localToWorldMatrix

Declaration
public Matrix4x4 localToWorldMatrix { get; }
Property Value
Type Description
Matrix4x4

lossyScale

Declaration
public Vector3 lossyScale { get; }
Property Value
Type Description
Vector3
| Improve this Doc View Source

parent

Declaration
public Transform parent { get; set; }
Property Value
Type Description
Transform

position

Declaration
public Vector3 position { get; set; }
Property Value
Type Description
Vector3
| Improve this Doc View Source

right

Declaration
public Vector3 right { get; set; }
Property Value
Type Description
Vector3
| Improve this Doc View Source

root

Declaration
public Transform root { get; }
Property Value
Type Description
Transform

rotation

Declaration
public Quaternion rotation { get; set; }
Property Value
Type Description
Quaternion
| Improve this Doc View Source

up

Declaration
public Vector3 up { get; set; }
Property Value
Type Description
Vector3

worldToLocalMatrix

Declaration
public Matrix4x4 worldToLocalMatrix { get; }
Property Value
Type Description
Matrix4x4

Methods

DetachChildren()

Declaration
public void DetachChildren()
| Improve this Doc View Source

Find(String)

Declaration
public Transform Find(string n)
Parameters
Type Name Description
String n
Returns
Type Description
Transform
| Improve this Doc View Source

FindChild(String)

Declaration
[Obsolete("FindChild has been deprecated. Use Find instead (UnityUpgradable) -> Find([mscorlib] System.String)", false)]
public Transform FindChild(string n)
Parameters
Type Name Description
String n
Returns
Type Description
Transform

GetChild(Int32)

Declaration
public Transform GetChild(int index)
Parameters
Type Name Description
Int32 index
Returns
Type Description
Transform

GetChildCount()

Declaration
[Obsolete("warning use Transform.childCount instead (UnityUpgradable) -> Transform.childCount", false)]
public int GetChildCount()
Returns
Type Description
Int32
| Improve this Doc View Source

GetEnumerator()

Declaration
public IEnumerator GetEnumerator()
Returns
Type Description
IEnumerator

GetSiblingIndex()

Declaration
public int GetSiblingIndex()
Returns
Type Description
Int32
| Improve this Doc View Source

InverseTransformDirection(Single, Single, Single)

Declaration
public Vector3 InverseTransformDirection(float x, float y, float z)
Parameters
Type Name Description
Single x
Single y
Single z
Returns
Type Description
Vector3

InverseTransformDirection(Vector3)

Declaration
public Vector3 InverseTransformDirection(Vector3 direction)
Parameters
Type Name Description
Vector3 direction
Returns
Type Description
Vector3
| Improve this Doc View Source

InverseTransformPoint(Single, Single, Single)

Declaration
public Vector3 InverseTransformPoint(float x, float y, float z)
Parameters
Type Name Description
Single x
Single y
Single z
Returns
Type Description
Vector3

InverseTransformPoint(Vector3)

Declaration
public Vector3 InverseTransformPoint(Vector3 position)
Parameters
Type Name Description
Vector3 position
Returns
Type Description
Vector3
| Improve this Doc View Source

InverseTransformVector(Single, Single, Single)

Declaration
public Vector3 InverseTransformVector(float x, float y, float z)
Parameters
Type Name Description
Single x
Single y
Single z
Returns
Type Description
Vector3

InverseTransformVector(Vector3)

Declaration
public Vector3 InverseTransformVector(Vector3 vector)
Parameters
Type Name Description
Vector3 vector
Returns
Type Description
Vector3

IsChildOf(Transform)

Declaration
public bool IsChildOf(Transform parent)
Parameters
Type Name Description
Transform parent
Returns
Type Description
Boolean
| Improve this Doc View Source

LookAt(Transform)

Declaration
public void LookAt(Transform target)
Parameters
Type Name Description
Transform target
| Improve this Doc View Source

LookAt(Transform, Vector3)

Declaration
public void LookAt(Transform target, [DefaultValue("Vector3.up")] Vector3 worldUp)
Parameters
Type Name Description
Transform target
Vector3 worldUp
| Improve this Doc View Source

LookAt(Vector3)

Declaration
public void LookAt(Vector3 worldPosition)
Parameters
Type Name Description
Vector3 worldPosition
| Improve this Doc View Source

LookAt(Vector3, Vector3)

Declaration
public void LookAt(Vector3 worldPosition, [DefaultValue("Vector3.up")] Vector3 worldUp)
Parameters
Type Name Description
Vector3 worldPosition
Vector3 worldUp
| Improve this Doc View Source

Rotate(Single, Single, Single)

Declaration
public void Rotate(float xAngle, float yAngle, float zAngle)
Parameters
Type Name Description
Single xAngle
Single yAngle
Single zAngle
| Improve this Doc View Source

Rotate(Single, Single, Single, Space)

Declaration
public void Rotate(float xAngle, float yAngle, float zAngle, [DefaultValue("Space.Self")] Space relativeTo)
Parameters
Type Name Description
Single xAngle
Single yAngle
Single zAngle
Space relativeTo
| Improve this Doc View Source

Rotate(Vector3)

Declaration
public void Rotate(Vector3 eulers)
Parameters
Type Name Description
Vector3 eulers
| Improve this Doc View Source

Rotate(Vector3, Single)

Declaration
public void Rotate(Vector3 axis, float angle)
Parameters
Type Name Description
Vector3 axis
Single angle
| Improve this Doc View Source

Rotate(Vector3, Single, Space)

Declaration
public void Rotate(Vector3 axis, float angle, [DefaultValue("Space.Self")] Space relativeTo)
Parameters
Type Name Description
Vector3 axis
Single angle
Space relativeTo
| Improve this Doc View Source

Rotate(Vector3, Space)

Declaration
public void Rotate(Vector3 eulers, [DefaultValue("Space.Self")] Space relativeTo)
Parameters
Type Name Description
Vector3 eulers
Space relativeTo

RotateAround(Vector3, Single)

Declaration
[Obsolete("warning use Transform.Rotate instead.")]
public void RotateAround(Vector3 axis, float angle)
Parameters
Type Name Description
Vector3 axis
Single angle
| Improve this Doc View Source

RotateAround(Vector3, Vector3, Single)

Declaration
public void RotateAround(Vector3 point, Vector3 axis, float angle)
Parameters
Type Name Description
Vector3 point
Vector3 axis
Single angle

RotateAroundLocal(Vector3, Single)

Declaration
[Obsolete("warning use Transform.Rotate instead.")]
public void RotateAroundLocal(Vector3 axis, float angle)
Parameters
Type Name Description
Vector3 axis
Single angle

SetAsFirstSibling()

Declaration
public void SetAsFirstSibling()

SetAsLastSibling()

Declaration
public void SetAsLastSibling()
| Improve this Doc View Source

SetParent(Transform)

Declaration
public void SetParent(Transform p)
Parameters
Type Name Description
Transform p

SetParent(Transform, Boolean)

Declaration
public void SetParent(Transform parent, bool worldPositionStays)
Parameters
Type Name Description
Transform parent
Boolean worldPositionStays

SetPositionAndRotation(Vector3, Quaternion)

Declaration
public void SetPositionAndRotation(Vector3 position, Quaternion rotation)
Parameters
Type Name Description
Vector3 position
Quaternion rotation

SetSiblingIndex(Int32)

Declaration
public void SetSiblingIndex(int index)
Parameters
Type Name Description
Int32 index
| Improve this Doc View Source

TransformDirection(Single, Single, Single)

Declaration
public Vector3 TransformDirection(float x, float y, float z)
Parameters
Type Name Description
Single x
Single y
Single z
Returns
Type Description
Vector3

TransformDirection(Vector3)

Declaration
public Vector3 TransformDirection(Vector3 direction)
Parameters
Type Name Description
Vector3 direction
Returns
Type Description
Vector3
| Improve this Doc View Source

TransformPoint(Single, Single, Single)

Declaration
public Vector3 TransformPoint(float x, float y, float z)
Parameters
Type Name Description
Single x
Single y
Single z
Returns
Type Description
Vector3

TransformPoint(Vector3)

Declaration
public Vector3 TransformPoint(Vector3 position)
Parameters
Type Name Description
Vector3 position
Returns
Type Description
Vector3
| Improve this Doc View Source

TransformVector(Single, Single, Single)

Declaration
public Vector3 TransformVector(float x, float y, float z)
Parameters
Type Name Description
Single x
Single y
Single z
Returns
Type Description
Vector3

TransformVector(Vector3)

Declaration
public Vector3 TransformVector(Vector3 vector)
Parameters
Type Name Description
Vector3 vector
Returns
Type Description
Vector3
| Improve this Doc View Source

Translate(Single, Single, Single)

Declaration
public void Translate(float x, float y, float z)
Parameters
Type Name Description
Single x
Single y
Single z
| Improve this Doc View Source

Translate(Single, Single, Single, Space)

Declaration
public void Translate(float x, float y, float z, [DefaultValue("Space.Self")] Space relativeTo)
Parameters
Type Name Description
Single x
Single y
Single z
Space relativeTo
| Improve this Doc View Source

Translate(Single, Single, Single, Transform)

Declaration
public void Translate(float x, float y, float z, Transform relativeTo)
Parameters
Type Name Description
Single x
Single y
Single z
Transform relativeTo
| Improve this Doc View Source

Translate(Vector3)

Declaration
public void Translate(Vector3 translation)
Parameters
Type Name Description
Vector3 translation
| Improve this Doc View Source

Translate(Vector3, Space)

Declaration
public void Translate(Vector3 translation, [DefaultValue("Space.Self")] Space relativeTo)
Parameters
Type Name Description
Vector3 translation
Space relativeTo
| Improve this Doc View Source

Translate(Vector3, Transform)

Declaration
public void Translate(Vector3 translation, Transform relativeTo)
Parameters
Type Name Description
Vector3 translation
Transform relativeTo

Implements

System.Collections.IEnumerable

Extension Methods

MustExtensions.MustBeEqual<T>(T, T)
MustExtensions.MustBeEqual<T>(T, T, String)
MustExtensions.MustNotBeEqual<T>(T, T)
MustExtensions.MustNotBeEqual<T>(T, T, String)
MustExtensions.MustBeNull<T>(T)
MustExtensions.MustBeNull<T>(T, String)
MustExtensions.MustNotBeNull<T>(T)
MustExtensions.MustNotBeNull<T>(T, String)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX