- Home /
Simple Vertical List of UI Elements
I'm on this for two days now. I believed such a simple thing could be easily done or at least well documented, but I fail to find code or examples for it. Kind of getting desperate.
What I want: A scrollable list of elements that I can append to at runtime via code. So I found the docs about the Scroll Rect and the video for it. But it did not help me one bit, because it left out right the points I need.
So, as a child of the ScrollRect, I set an empty GameObject ("Content") with a Scroll Rect component. To that Content I append all the child UI Elements.
All I want is the following: All the children shall have the width of the Scroll View, but keep their height. And once the Elements grow out of the Content element, it shall resize and be scrollable.
So why is that so difficult to achieve? If anyone knows an example for this, I'll be most greatful.
Answer by Mmmpies · Feb 05, 2015 at 06:24 PM
It's not difficult, you just have to know how. Fortunately we walk in the footsteps of giants and @BoredMormon worked this out a while ago.
I wrote it down for someone on a slow connection but links to the tutorial are in there if you want to watch the clip instead of work through the pdf.
Thanks a lot for this, it worked perfectly. And thanks a thousand times for writing the PDF, I have great trouble with video tutorials.
Here's a tutorial I've made. Hope it helps
Your answer
