Skip to content

Transform ​

位置・回転・拡縮と親子関係を保持します。すべての通常GameObjectに付いています。

使い方と前提条件 · C# API一覧

型の情報 ​

FromEntity ​

csharp
public static Transform FromEntity(GameObject gameObject)

既にComponentを持つGameObjectから操作用の参照を作ります。Componentを追加する操作ではありません。

引数型既定値
gameObjectNEMEngine.GameObject必須

戻り値:NEMEngine.Transform。

GetChild ​

csharp
public Transform GetChild(int index)

指定した子を取得し、範囲外は呼出し元へ返す

引数型既定値
indexint必須

戻り値:NEMEngine.Transform。

InverseTransformDirection ​

csharp
public Vector3 InverseTransformDirection(Vector3 direction)

world direction をローカル空間へ戻す。

引数型既定値
directionNEMEngine.Vector3必須

戻り値:NEMEngine.Vector3。

InverseTransformPoint ​

csharp
public Vector3 InverseTransformPoint(Vector3 point)

world point をこの Transform のローカル空間へ戻す。

引数型既定値
pointNEMEngine.Vector3必須

戻り値:NEMEngine.Vector3。

LookAt ​

csharp
public void LookAt(Vector3 target)

target を向く world 回転を設定する。target が現在位置とほぼ同じなら何もしない(ゼロ長 direction 対策)。

引数型既定値
targetNEMEngine.Vector3必須

Rotate ​

csharp
public void Rotate(Quaternion rotation, Space space = Self)

クォータニオンで回転を加える。Unity と同じく Self は localRotationdelta、World は deltarotation。

引数型既定値
rotationNEMEngine.Quaternion必須
spaceNEMEngine.Space0

Rotate ​

csharp
public void Rotate(Vector3 eulerAngles, Space space = Self)

オイラー角(度)で回転を加える。Space.Self はローカル回転へ後乗算、Space.World はワールド回転へ前乗算。

引数型既定値
eulerAnglesNEMEngine.Vector3必須
spaceNEMEngine.Space0

SetParent ​

csharp
public void SetParent(Transform? parent, bool worldPositionStays = true)

親の変更後もworld座標を保つか指定する

引数型既定値
parentNEMEngine.Transform?必須
worldPositionStaysboolTrue

SetPositionAndRotation ​

csharp
public void SetPositionAndRotation(Vector3 position, Quaternion rotation)

world position と world rotation を一括設定する(個別 setter と同じ内部実装へ委譲)。

引数型既定値
positionNEMEngine.Vector3必須
rotationNEMEngine.Quaternion必須

TransformDirection ​

csharp
public Vector3 TransformDirection(Vector3 direction)

direction を world 回転で写す(位置・scale の影響は受けない)。

引数型既定値
directionNEMEngine.Vector3必須

戻り値:NEMEngine.Vector3。

TransformPoint ​

csharp
public Vector3 TransformPoint(Vector3 point)

position を world 空間の point として変換する(lossyScale → world 回転 → world 位置)。

引数型既定値
pointNEMEngine.Vector3必須

戻り値:NEMEngine.Vector3。

Translate ​

csharp
public void Translate(Vector3 translation, Space space = Self)

translation 分だけ移動する。Space.Self は自身の回転を掛けたローカル軸方向、Space.World はワールド軸方向。

引数型既定値
translationNEMEngine.Vector3必須
spaceNEMEngine.Space0

childCount ​

csharp
public int childCount

子の数。firstChild / nextSibling を辿って数える(hierarchy は native 側が一貫管理)

操作:読取専用。

componentTypeID ​

csharp
public static int componentTypeID

組み込みComponentの接続識別子です。通常のゲームコードではGetComponentで取得します。

操作:読取専用。

eulerAngles ​

csharp
public Vector3 eulerAngles

ワールド回転をZXYの角度で扱う

操作:読取・変更。

forward ​

csharp
public Vector3 forward

world 回転を基準にした各方向ベクトル

操作:読取専用。

ignoreParentRotation ​

csharp
public bool ignoreParentRotation

親(エンティティ階層 / スキンメッシュのジョイント)追従で回転を無視するか。座標は常に追従する

操作:読取・変更。

ignoreParentScale ​

csharp
public bool ignoreParentScale

親追従でスケールを無視するか

操作:読取・変更。

localEulerAngles ​

csharp
public Vector3 localEulerAngles

ローカル回転をZXYの角度で扱う

操作:読取・変更。

localPosition ​

csharp
public Vector3 localPosition

親に対するローカル位置です。

操作:読取・変更。

localRotation ​

csharp
public Quaternion localRotation

親に対する回転Quaternionです。

操作:読取・変更。

localScale ​

csharp
public Vector3 localScale

親に対する拡縮倍率です。

操作:読取・変更。

lossyScale ​

csharp
public Vector3 lossyScale

world(lossy) scale。親階層の継承設定を反映した成分積の近似値(読み取り専用)

操作:読取専用。

parent ​

csharp
public Transform? parent

親TransformまたはPhaseの追従設定です。

操作:読取・変更。

position ​

csharp
public Vector3 position

ワールド空間の位置です。

操作:読取・変更。

right ​

csharp
public Vector3 right

右方向の単位ベクトルです。

操作:読取専用。

rotation ​

csharp
public Quaternion rotation

world回転。親階層の継承設定を反映し、setも同じ親回転でlocalへ変換される

操作:読取・変更。

up ​

csharp
public Vector3 up

上方向の単位ベクトルです。

操作:読取専用。

実行時の扱い ​

Nativeと接続する操作は、Scriptが実行される有効なWorld内で使用します。破棄したGameObjectやComponentへのアクセスは避けてください。設定Snapshotは取得・編集・反映を1組で扱います。

現行版マニュアル · 8ea58ba2 · 2026-10-28確認