得到修改面板的3个值 1.Position get: transform.position //Vector3 transform.position.x transform.position.y transform.position.z
xx = GameObject.Find("objName").GetComponent<Transform>().position.x;
yy = GameObject.Find("objName").GetComponent<Transform>().position.y;
zz = GameObject.Find("objName").GetComponent<Transform>().position.z;
修改: transform.position = new Vector3(x,y,z); 2.Rotation get: transform.localEulerAngles.x; transform.localEulerAngles.y; transform.localEulerAngles.z; 修改: transform.localEulerAngles = new Vector3(x,y,z); rotation = new Rotation(x,y,z,w); ?
3.Scale get: transform.localScale.x transform.localScale.y transform.localScale.z 修改: transform.localScale = new Vector3(x,y,z)
|