- Home /
ScrollRect expand up to a max height
I'm attempting to have a list of items that scrolls if it exceeds a maximum height for the container. If anyone is familiar with CSS, I'm essentially trying to replicate the following css behavior using Unity's UI components:
overflow-y: auto;
max-height: <some number>px;
Here's a live example to see what I mean: https://jsfiddle.net/x8xs4s4a/
Now perhaps I'm missing something obvious, but I can't seem to find a way to have a ScrollRect with a dynamic content height (that supports a dynamic number of items) and a dynamic viewport height up to a maximum height.
Of course it would be ideal if there was a way to do this without scripting my own behavior, but if that's not possible, suggestions as to how to go about implementing it (in C#) would be appreciated.
Your answer
Follow this Question
Related Questions
Chat Message Box with Dynamic Message Sizes help 1 Answer
Scroll view not resizing properly with dynamic content 0 Answers
Low FPS in Android 1 Answer
How to access scrollview in VR? 0 Answers