I’m going to have various bits of text pulled from a database to be displayed in the text field within the scroll view. The issue is there is differing amounts of text for different objects so I was wondering if there was some way to automate it instead of manually inputting the height (which will be a trial and error thing).
I did find a couple posts addressing this issue by using the “Content Size Fitter” and setting “Virtual Fit” to “Preferred Size” but that makes it smaller back to the default size. Any idea what I’m doing wrong?
I’ve attached an image of the hierarchy below and what my text field looks like.




1 Like
I am currently looking into this too and you posted at the right time. I dont have an answer at this either.
I have a datalist that varies from 11 to 100 rows so I made the content window large. When there are only 11 rows the user can scroll a long time and end with a window that is empty. This drove to research this content size change. It is currently #3 on my todo-s. I watch with baited breath till then.
Thank for posting this question.
Do let me know over here if you happen to come across a solution, I’ll do the same.
@giantkilleroverunity3d I think I’ve found a workout for my particular issue, gotta test is thoroughly.
Here’s What I did
Scroll View
→ Viewport
—> Content (Vertical Layout Group, child control size width/height and child force expand width/height + content size fitter with vertical fit preferred size)
6 Likes
Add a Content Size Fitter component to the Content Game Object and set Vertical Fit to Min Size for anyone who is struggling with this.
2 Likes