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);
}
Page last updated: 2010-12-19