I need to use a scrollbar but without a layout group.

This probably should go into the UI forum, but I figured it may get more coverage here.

So I’ve been having this problem plague me for a little, essentially I created a scene where I have the player enter their name and whatnot, basically, not everything can fit on the screen all at once, hence why I want to use a scrollbar. However, no matter what I tried, I couldn’t get the scrollbar to work. I looked and asked around, and found out I need to use some sort of layout group. Problem is, my UI doesn’t fit a “vertical” or “horizontal” layout group, it has its own unique look.

I made the scene without a layout group in the first place, if I add one now, obviously Unity constrains the UI and messes the whole thing up. For context, image one is what happens if I add a UI Layout Group, obviously, I don’t want it to look like this. The second image is all the things in my window that I’d like my scrollbar to handle, “Content” is where all of my content is located. if you look at the third image, you can see that I have a couple of buttons below the “Content” box, this is what I want to use my scrollbar to view. You can also see the “unique” look I’m talking about.

So I’m in a bit of a dilemma, all I want is for the player to be able to use a scrollbar to view what’s below the screen, but it doesn’t seem I can use it without a layout group, which I don’t want to do because Unity doesn’t allow you to move things around outside of that layout group’s constraints.


6998060--826811--unityhelp.PNG
6998240--826835--unityhelp2.PNG

You don’t need a layout group. Make the UI content you want, spaced and anchored how you like, whatever size you like, and get it the way you like. Save that for future reference (like in a separate scene).

Now create a ScrollView that is as large as you want, and has scrollBars however you like (horiz or vert)

Drag your content into the Content field under the Scrollview, then expand the Content rect to enclose your UI.

A bit clearer, but I’m confused on what you mean by “scrollview”? How do I create that?

Just like any other UI stuff:

Right-click in Hierarchy → UI → ScrollView

Ok, I tested that out, but I’m still confused. If you look at the attachment, I already have all that content , you see the buttons below everything else? I just want a scrollbar to scroll down to those, If I create a scrollview, it just appears over that

6998240--826835--unityhelp2.PNG

Update: I got it working, I had to create an empty game object, attach a rect transform to it, stretch that empty game object to all the content I wanted in that scene, then make all my content a child of that game object. Then I put the parent in the Content field in the scroll rect.