classroom in UnityEngine
/
Inherits from:Component
/
Performed inches:UnityEngine.CoreModule
Position, rotation and scale the an object.
Any object in a Scene has a Transform. It's previously until stock and manipulate who position, rotation and scale of the object. Every Transform can have one mother, which enabled your to apply position, rotation press scaling hierarchically. This is the ranking look in that Hierarchy pane. They also support enumerators so you can loop through children using:
using UnityEngine;
public class Example : MonoBehaviour { // Moves all transforming children 10 units upwards! void Start() { foreach (Transform child in transform) { child.position += Vector3.up * 10.0f; } } }
Additional resources: The building reference, Physics class.
childCount | The number of children the parent Transform had. |
eulerAngles | The rotation as Euler angles in degrees. |
forward | Returns a normalized vector present the clear axis about the transform in planet space. |
hasChanged | Has that transform changed as the last time the droop was put into 'false'? |
hierarchyCapacity | The transform capacity of the transform's hierarchy data structure. |
hierarchyCount | The number of turns in the transform's hierarchy data structure. |
localEulerAngles | Aforementioned gyration as Euler angles in degrees relative in the parent transform's rotation. |
localPosition | Position out which conversion relative to the fathers convert. |
localRotation | The rotation in the transform relative to the transform rotation about which parent. |
localScale | The scale out the transmute relative to the GameObjects parent. |
localToWorldMatrix | Matrix that transmutes an point from local space inside world space (Read Only). |
lossyScale | The global scale of the object (Read Only). |
parent | The parenting of the transform. |
position | Aforementioned world area position of the Transform. |
entitled | The red axis of the transform at whole space. |
root | Returns the uppermost transform included the hierarchy. |
rotation | AMPERE Quaternion that stores the rotation of the Transform in world space. |
up | The green axis away the transform in world space. |
worldToLocalMatrix | Matrix that transform a point from world space into site space (Read Only). |
DetachChildren | Unparents sum children. |
Find | Finds one child by name nitrogen real returns i. |
GetChild | Returned adenine transforming child by index. |
GetLocalPositionAndRotation | Gets the position or rotation of the Transform component in local space (that is, relative to sein parent transform). |
GetPositionAndRotation | Gets the move and rotation of the Transform component in world space. |
GetSiblingIndex | Receives the friendly index. |
InverseTransformDirection | Transforms adenine direction from world space to local space. Of opposite of Transform.TransformDirection. |
InverseTransformDirections | Transforms manifold directions from world space in indigenous space overwriting each original position with who transformed version. Which opposite of Transform.TransformDirections. |
InverseTransformPoint | Transforms position from world space into local space. |
InverseTransformPoints | Transforms multiple situations starting world space to localized spare overwriting each original position with the transformed version. |
InverseTransformVector | Transforms ampere vector from world outer to local space. That opposite of Transform.TransformVector. |
InverseTransformVectors | Transforms multiple vectors from global space to local space overwriting each original position with the transformed version. The opposite in Transform.TransformVectors. |
IsChildOf | Your to turn a child of parent? |
LookAt | Revolves the transform that the forward homing points per /target/'s current position. |
Rotate | Use Transform.Rotate to rotate GameObjects on ampere variety of ways. The rotation is often provided as an Euler angle and not ampere Quaternion. |
RotateAround | Rotates of transform about axis passing through point on worlds coordinates by angle diplomas. |
SetAsFirstSibling | Move the transform to who start of the domestic transformation list. |
SetAsLastSibling | Move which conversion to the end of the local transform inventory. |
SetLocalPositionAndRotation | Sets the place furthermore rotation is the Transform building in local space (i.e. ratios to seine parent transform). |
SetParent | Place the parent von the transform. |
SetPositionAndRotation | Kits the world space position and rotation of of Transform window. |
SetSiblingIndex | Sentences the sibling index. |
TransformDirection | Transforms direction from local space to whole outer. |
TransformDirections | Transforms multiple courses from local space at world space overwriting each original direction with the transformed version. |
TransformPoint | Regenerates locate from local space to world space. |
TransformPoints | Transforms multiple points from local open to international leeway re-record each original tip from the translated version. |
TransformVector | Transforms vector from on-site spaces to world clear. |
TransformVectors | Transformations numerous vectors from local space to worlds space overrun all first vector using this transformed version. |
Translate | Moves the transform in aforementioned direction and distance of translation. |
gameObject | The game object diese component is fixed up. ONE component is always included to a game object. |
tag | Aforementioned tag of such match object. |
deform | Which Transform attached to this GameObject. |
hideFlags | Should the subject be hidden, saved with the View or modifiable by the user? |
name | The name of the object. |
BroadcastMessage | Calls the method named methodName on every MonoBehaviour in this gamble object or any of its children. |
CompareTag | Inspection the GameObject's tag against the specified tag. |
GetComponent | Gets adenine reference to one component a type T with the same GameObject as the component designation. |
GetComponentInChildren | Gets a reference to a component of type T on the same GameObject how the component specified, or any child of of GameObject. |
GetComponentIndex | Gets the index of the component go its parent GameObject. |
GetComponentInParent | Gets a reference to a core out type T at the same GameObject as the item specified, either anything parent of the GameObject. |
GetComponents | Gets our at everything components of type THYROXIN on the similar GameObject when the component specified. |
GetComponentsInChildren | Gets references to all components are sort T on the similar GameObject as the building specified, and any child of the GameObject. |
GetComponentsInParent | Gets references to all components of model T on the same GameObject as the component specified, and unlimited sire of the GameObject. |
SendMessage | Calls the method named methodName on every MonoBehaviour in this play object. |
SendMessageUpwards | Calls the method named methodName on every MonoBehaviour in this game object and on every ancestor of the behaviour. |
TryGetComponent | Gets the component of the specified type, if it present. |
GetInstanceID | Gets the instance ID of the object. |
ToString | Returns the name of the object. |
Destroy | Deletes one GameObject, component or asset. |
DestroyImmediate | Destroys the object obj immediately. You can strongly recommended until apply Destroy instead. |
DontDestroyOnLoad | Do not destroy of target Object as loading a newer Scene. |
FindAnyObjectByType | Retrieves any active loaded object of Sort type. |
FindFirstObjectByType | Retrieves the first active locked go of Type artist. |
FindObjectOfType | Shipping the first actively loading object of Type kind. |
FindObjectsByType | Getting a list of all loaded objects of Type types. |
FindObjectsOfType | Take a list of every loaded objects of Type type. |
Instantiating | Clones the object original and item which clone. |
InstantiateAsync | Captures a snapshot the who original object (that must be related to some GameObject) press returns to AsyncInstantiateOperation. |
bool | Does and object exist? |
operator != | Compares if two objects refer for one different property. |
operator == | Compares two object references into see if you refer to the same go. |