Transform
- childCount
- DetachChildren
- eulerAngles
- Find
- forward
- InverseTransformDirection
- InverseTransformPoint
- IsChildOf
- localEulerAngles
- localPosition
- localRotation
- localScale
- localToWorldMatrix
- LookAt
- lossyScale
- parent
- position
- right
- root
- RotateAround
- Rotate
- rotation
- TransformDirection
- TransformPoint
- Translate
- up
- worldToLocalMatrix
Transform.Find 查找
function Find (name : string) : Transform
Description描述
Finds a child by name and returns it.
通过名字查找子物体并返回它。
If no child with name can be found, null is returned. If name contains a '/' character it will traverse the hierarchy like a path name.
如果没有查找到子物体名字,将返回null。如果名字包含“/”字符它将向路径一样穿越层次。
还没有添加代码
// The magical rotating finger
//查找到手指物体并旋转它
function Update() {
aFinger = transform.Find("LeftShoulder/Arm/Hand/Finger");
aFinger.Rotate(Time.deltaTime*20, 0, 0);
}
最后修改:2010年12月19日 Sunday 17:04