Unity 修改场景中物体的位置 1.利用Vector2.anchoredPosetion 2.利用Vector2.posetion 3.利用Vector2.localPosetion 4.利用Vector3.posetion 5.利用Vecto3.localPosetion 1.利用Vector2.anchoredPosetion anchoredPosition 的原点是元素本身的 anchor Vector2 temp = GetComponent<RectTransform>().anchoredPosition; GetComponent<RectTransform>().anchoredPosition = new Vector2(temp.x, temp.y + 50f)