#if UNITY_EDITOR
//编辑器下,rect起点(0,0)在左上角!!!
//好坑
Rect rect = new Rect(screenPos.x - width / 2, Screen.height - (screenPos.y + height / 2),
width, height
);
#else
//手机端下,rect起点(0,0)在左下角!!!
Rect rect = new Rect(screenPos.x - width / 2, screenPos.y - height / 2
, width, height
);
#endif
Unity 截屏时,安卓和编辑器下,Rect的坑
最新推荐文章于 2024-09-16 20:31:38 发布