Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/unity3d/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/search/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Unity3d 如何在NGUI中访问UIScrollView的剪切矩形位置_Unity3d_Scrollview_Ngui - Fatal编程技术网

Unity3d 如何在NGUI中访问UIScrollView的剪切矩形位置

Unity3d 如何在NGUI中访问UIScrollView的剪切矩形位置,unity3d,scrollview,ngui,Unity3d,Scrollview,Ngui,我使用的是NGUI v3.5.4r2版本。我正在尝试访问UIScrollView中的剪切矩形位置。我可以获取剪切矩形的高度和宽度,但无法访问UIScrollView剪切矩形的位置 谢谢你的帮助。 谢谢。您可以使用UIRect的localCorners变量(UIPanel继承了该变量)获取任意角点的矢量3点 UIPanel mPanel; Vector3 bottom_Left = mPanel.localCorners[0]; Vector3 top_Left = mPanel.localCor

我使用的是NGUI v3.5.4r2版本。我正在尝试访问UIScrollView中的剪切矩形位置。我可以获取剪切矩形的高度和宽度,但无法访问UIScrollView剪切矩形的位置

谢谢你的帮助。
谢谢。

您可以使用UIRect的localCorners变量(UIPanel继承了该变量)获取任意角点的矢量3点

UIPanel mPanel;
Vector3 bottom_Left = mPanel.localCorners[0];
Vector3 top_Left = mPanel.localCorners[1];
Vector3 top_Right = mPanel.localCorners[2];
Vector3 bottom_Right = mPanel.localCorners[3];

位置的确切含义是什么?我想得到在UIScrollView中显示网格项的粉红色矩形位置