문제

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