Hi,
what would be the best way to achieve a zoom effect inside a scrollview?
I tried (pseudo code)
scrollViewPosition = GUI.BeginScrollView(new Rect(0, 0, ViewportRect.width
, ViewportRect.height)
, scrollViewPosition
, BiggerRect);
Matrix4x4 m = GUI.Matrix;
GUIUtility.ScaleAroundPivot(Vector.one * 0.5f, Vector.zero);
//draw objects
GUI.Matrix = m;
and it seems that everything is scaled correctly, as well as the mouse coordinates, but the clipping rectangle is smaller than the scroll view rectangle.
Any suggestion is welcome.
Thanks.