Scroll Rect - Scrolling Limit

I have a how to play panel that the user can scroll through. The panel includes images and text. I have my scroll rect settings on unrestricted. I have tried the other setting including clamped and elastic. Elastic does not let me scroll very far (as seen in the video below) and clamped restricts any movement at all. With the unrestricted setting the user is able to scroll forever which does not look good in a final product. How can I make a scrolling constraint at the top and bottom of the panel?

I posted this video for another issue I was having (which is solved), but you can see my setup - - YouTube

I know this is a bit of an older post and that you’ve probably figured it out by now.

Problem: Clamped Movement Type doesn’t scroll. Elastic Movement Type only scrolls to top.

Solution: Within the Content Size Fitter, set the axis you’re scrolling on to Preferred size.

I have encountered today a similar problem.

If the elastic mode acts like unrestricted and clamp doesn’t allow you to scroll.
It’s probably because you have setup the viewpor of the scrollRect to the wrong GameObject.

Since it took me hours to find out and I kept finding this post I post here the answer of my problem.

How it works and how it should work may not always be the same :
After having used unity for over 2 Years and Scroll rects etc all implemented quite often with very different demands i still run into troubles like these !!

This time : The solution was to add a horizontal layout group (for horizontal scrolling) on the content.
The problem seems to be that the scroll rect does not get the correct values from the content size fitter without the layout group ???
I do not remember what the tutorial has to say about this, but it does seem all weird. Somehow the logic of it all still eludes me, which means the components often do not behave like one would assume from the tutorials or the manual.

For me personally, the key was to understand that the content has to be larger than the root (viewport) Then, the desired effect could be achieved:) Hope this helps someone!

Oh come on. You should go through official manual/learn section/documentation BEFORE asking here. Believe me, you’re gonna learn many valuable things there!
it’s covered at 2:30, but i highly reccomend you watching the whole video, and thengo through all the /learn/tutorials section.

For anyone else struggling with this here is what worked for me.

The set up looks like this.(All is on a canvas)

Playersview (My Scrollview, initially added by right click → UI-.Scroll View )

The Viewport comes standard with Scroll View.
The view port is basically like the window you look through at the landscape (or huge picture or whatever you are scrolling over.

The content (Panel in my case ) is the landscape ( the big thing you are scrolling).

Panel (UI-> panel element , this is what I use to hold my scrollable content ie. my player buttons

So firstly to get things right . In the Scroll Rect component make sure you have your content field set to your actual content (landscape , big thing etc) .
Make sure that your View Port field is set to the ViewPort ((Your window , thing you are looking through).

If you now set your Scroll Rect → Movement Type to clamped, the scroll should not move beyond your content.

In my case my panel (the content ) actually gets populated with buttons at run time , so I added a content fitter component to resize it dynamically.

Sorry about all the house analogy, but this was the easiest way for me to explain.
Hope this helps someone.

Make a New Game Object outside the content Panel and resize it’s rect transform that to of the screen now drag this game object’s rect transform to your scroll rect’s view port and set the mode to clamped this worked for me.

@El-Deiablo What Did it for me to make it was

1.Change Scroll View - Movement : elastic

2.Add Vertical/Horizontal layout group depending on what you need To Viewport

3.Enable Vertical/Horizontal layout group - Control Child Size : Width and or Height, So the content size
will always change depending on what you have, will also make it unrestricted when inside the Contents Area and elastic outside of it

4.Enjoy A nice looking UI that won’t make you depressed working on it every min

I ran into this same problem recently and found a whole new thing that can screw with this. In your Layout Group, make sure that you don’t have any padding at the top or bottom. I had somehow added a ton of padding to the top, which was allowing it to scroll past the top of the content.