四种坐标系:
(一)World Space(世界坐标系)
在场景中添加的物体(如:Cube)都是以世界坐标显示在场景中的。
获得GameObject世界坐标的接口为Transform.position 。
获得GameObject局部坐标系的接口为Transform.localPosition。
世界坐标转化为屏幕坐标 Camera.WorldToScreenPoint
世界坐标转化为视口坐标 Camera.WorldToViewportPoint
(二)Screen Space(屏幕坐标系)
以像素来定义的。Screen.width = Camera.pixelWidth;Screen.height = Camera.p