Using a ScrollRect for the first time, while I got it to work and resize the contents and parent properly, I can’t seem to find how to make it so that the ScrollRect is only visible within a specified RectTransform. I was under the impression that the Viewport attribute would be responsible for this.
I’ve set up my ScrollRect as follows:
Right now the contents container object is stretched beyond the screen dimensions and so when I’m scrolling I see the entire visible part of the content object, even though I have set the Viewport’s RectTransform like the red area in the picture below. How can I make it so that the ScrollRect is only visible within the marked area?