Transform 变换

Inherits from Component,IEnumerable

Position, rotation and scale of an object.


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;
using System.Collections;

public class example : MonoBehaviour {
public void Awake() {
foreach (Transform child in transform) {
child.position += Vector3.up * 10.0F;
// Moves all transform children 10 units upwards!
for (var child : Transform in transform) {
	child.position += Vector3.up * 10.0;
参见:Physics 类.



Inherited members继承成员

Inherited Variables继承变量

Inherited Functions继承函数

Inherited Class Functions继承类函数

Page last updated: 2011-5-16