Search code examples
user-interfaceunity-game-engineunity3d-guiscrollrect

How to make a Unity Scroll Rect NOT overflow?


I have a scroll rect that has input fields in it, and I would like it so that the user only sees things that are currently in it. Right now it is overflowing and has everything in it going out below it. I would like it so that these bottom fields do not show until the user scrolls down, the only thing in view should be what is currentlyenter image description here


Solution

  • Use a mask component with your Scroll Rect holding object. Either Rect Mask 2D or Mask.

    enter image description here