Hello all,
I'm running into a situation where I'd like to override the min/max scroll area of the UIScrollView. Currently my hierarchy is setup as follows:
| UIScrollView
---| UIGrid
--------| Sprite 1
--------| Sprite 2
--------| Sprite N
In this example, let's say all that the total height of rendering all of my sprites extends from Vector3(0, 0, 0) to Vector3(0, 1500, 0). However, due to masking and just not wanting to allow players to scroll all the way to the bottom of the scrollview, I wanted to limit the scrollview to only allow players to scroll from Vector3(0, 0, 0) to Vector3(0, 1200, 0).
It looks like in the UIScrollView, it's calculating the total width/height of the children elements to the scrollview and setting its scroll area to cover all renderable assets. Is there an easier way to prevent this behaviour that I'm not aware of outside of modifying the script? I tried limiting the Offset on the UIPanel attached to the UIScrollView, but that resulted in unexpected behaviour (possibly because I attempted to limit the values incorrectly).
Any ideas how I can achieve this? Any tips or pointers on setup would be appreciated - thanks!