Вопрос

I am using NGUI v3.5.4r2 version. I am try to access Clipping Rectangle position in UIScrollView. I can get height and width of Clipping Rectangle but unable to access position of Clipping Rectangle of UIScrollView.

Your help will be appreciated. Thanks You.enter image description here

Это было полезно?

Решение

You can use the localCorners variable of UIRect (of which UIPanel inherits) to get the Vector3 point of any of the corners.

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];
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top