オブジェクトの位置、回転、スケールを扱うクラス
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:
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; } } }
関連項目: Transform コンポーネント、Physics クラス .
| childCount | The number of children the parent Transform has. |
| eulerAngles | オイラー角としての角度 |
| forward | Returns a normalized vector representing the blue axis of the transform in world space. |
| hasChanged | フラグが最後に 'false' に設定されたときから Transform になんらかの変更があったかどうか |
| hierarchyCapacity | transform のヒエラルキーデータ構造の transform 容量 |
| hierarchyCount | transform のヒエラルキーデータ構造の transform の数 |
| localEulerAngles | 親の Transform オブジェクトから見た相対的なオイラー角としての回転値 |
| localPosition | 親の Transform オブジェクトから見た相対的な位置 |
| localRotation | The rotation of the transform relative to the transform rotation of the parent. |
| localScale | The scale of the transform relative to the GameObjects parent. |
| localToWorldMatrix | ローカル座標からワールド座標へ変換した行列(読み取り専用) |
| lossyScale | オブジェクトのグローバルスケール(読み取り専用) |
| parent | Transform の親 |
| position | The world space position of the Transform. |
| right | ワールド空間の Transform の赤軸 |
| root | 階層の一番上の Transform |
| rotation | A Quaternion that stores the rotation of the Transform in world space. |
| up | ワールド空間の Transform の緑軸 |
| worldToLocalMatrix | ワールド座標からローカル座標へ変換した行列(読み取り専用) |
| DetachChildren | すべての子オブジェクトを親オブジェクトから切り離します |
| Find | Finds a child by n and returns it. |
| GetChild | インデックスから子の transform を取得します |
| GetSiblingIndex | 現在の Transform のインデックスを取得します |
| InverseTransformDirection | ワールド空間からローカル空間へ direction を変換します。Transform.TransformDirection とは逆の機能になります |
| InverseTransformPoint | ワールド空間からローカル空間へ position を変換します。 |
| InverseTransformVector | ワールド空間からローカル空間へ vector を変換します。Transform.TransformVector の逆の機能です。 |
| IsChildOf | 親の子を変換するかどうか |
| LookAt | 対象の Transform を設定し、その方向へと向かせます |
| Rotate | Use Transform.Rotate to rotate GameObjects in a variety of ways. The rotation is often provided as an Euler angle and not a Quaternion. |
| RotateAround | ワールド座標の point を中心とした軸( axis )で angle 度回転させま |
| SetAsFirstSibling | ローカルの Transform リストで、一番最初の順番になるよう移動します。 |
| SetAsLastSibling | ローカルの Transform リストで、一番最後の順番になるよう移動します。 |
| SetParent | Transform の親を設定します |
| SetPositionAndRotation | Sets the world space position and rotation of the Transform component. |
| SetSiblingIndex | 指定のインデックスに Transform を移動させます。 |
| TransformDirection | ローカル空間からワールド空間へ direction を変換します |
| TransformPoint | ローカル空間からワールド空間へ position を変換します。 |
| TransformVector | ローカル空間からワールド空間へ vector を変換します。 |
| Translate | translation の方向と距離に移動します |
| gameObject | このコンポーネントはゲームオブジェクトにアタッチされます。コンポーネントはいつもゲームオブジェクトにアタッチされています。 |
| tag | ゲームオブジェクトのタグ |
| transform | The Transform attached to this GameObject. |
| hideFlags | Should the object be hidden, saved with the Scene or modifiable by the user? |
| name | オブジェクト名 |
| BroadcastMessage | ゲームオブジェクトまたは子オブジェクトにあるすべての MonoBehaviour を継承したクラスにある methodName 名のメソッドを呼び出します。 |
| CompareTag | このゲームオブジェクトは tag とタグ付けされているかどうか |
| GetComponent | ゲームオブジェクトに type がアタッチされている場合は type のタイプを使用してコンポーネントを返します。ない場合は null です |
| GetComponentInChildren | GameObject や深さ優先探索を活用して、親子関係にある子オブジェクトから type のタイプのコンポーネントを取得します。 |
| GetComponentInParent | GameObject や深さ優先探索を活用して、親子関係にある親オブジェクトから type のタイプのコンポーネントを取得します。 |
| GetComponents | GameObject から type のタイプのコンポーネントを「すべて」取得します。 |
| GetComponentsInChildren | GameObject や深さ優先探索を活用して、親子関係にある子オブジェクトから type のタイプのコンポーネントを「すべて」取得します。 |
| GetComponentsInParent | GameObject や深さ優先探索を活用して、親子関係にある親オブジェクトから type のタイプのコンポーネントを「すべて」取得します。 |
| SendMessage | ゲームオブジェクトにアタッチされているすべての MonoBehaviour にある methodName と名付けたメソッドを呼び出します |
| SendMessageUpwards | ゲームオブジェクトと親(の親、さらに親 ... )にアタッチされているすべての MonoBehaviour にある methodName と名付けたメソッドを呼び出します |
| GetInstanceID | オブジェクトのインスタンス ID を返します |
| ToString | Returns the name of the GameObject. |
| Destroy | ゲームオブジェクトやコンポーネント、アセットを削除します |
| DestroyImmediate | Destroys the object obj immediately. You are strongly recommended to use Destroy instead. |
| DontDestroyOnLoad | Do not destroy the target Object when loading a new Scene. |
| FindObjectOfType | タイプ type から最初に見つけたアクティブのオブジェクトを返します |
| FindObjectsOfType | タイプから見つけたすべてのアクティブのオブジェクト配列を返します |
| Instantiate | original のオブジェクトをクローンします |
| bool | オブジェクトが存在するかどうか |
| operator != | 二つのオブジェクトが異なるオブジェクトを参照しているか比較します |
| operator == | 2つのオブジェクト参照が同じオブジェクトを参照しているか比較します。 |