When I started adding stuff to my little dialog editor, I noticed that the visual elements are reduced to force them to fit in the window area. Of course, I would like to avoid this and I thought that a solution might be to put everything insider a scroll view. Is this correct, or there is some other mechanism to do it?
Hi rogerdv, It depends on what you want to do really. How do you want to manage the content that overflows? Do you actually want to scroll, how? Can you be more specific on what you want to achieve?
Yes, I want to scroll vertically. Its a long list of NPC lines and player replies that wont fit in a awindow, it needs to be scrolled up and down.
Did you consider using ListView? It is virtualized, which may improve performance if you have many items: https://docs.unity3d.com/ScriptReference/UIElements.ListView.html Also, have a look at the following USS properties: absolute position + explicit top/left/width/height overflow hidden/visible/scroll
Specifically regarding the shrinking effect, that's because the flex-shrink property defaults to 1 which means elements will try to shrink to fit inside a container. Setting flex-shrink: 0; should fix the shrinking. If you do want to just scroll, use a ScrollView as the container.
Thats what I did. I noticed that I could replace the container leemnt by an ScrollView and that fixed all problems. Besides, I put everything inside folds, so I can also reduce the parts Im not working to save space.