Hello,
I am trying to build a scrollview of buttons which can expand/collapse when clicked
Something along these lines:
And then imagine you click on one of these scrollview elements and you get something like this:
But ideally without things overlapping like that obviously.
Could anyone give me any pointers on how I can do it?
I’ve followed this excellent tutorial for the basic setup of my scrollview:
And the techniques described there work very nicely for my basic scrollview but when I try to do things like this it all falls apart.
I seem to have tried every possible combination of Layout Group, Layout Element, Content Size fitter, Text Alignment and Overflow, Best Fit… Nothing seems to work
In the screenshot above each scrollview element (row) is a vertical layout group containing two gameobjects one for the “Icon and Hint #” group and one for the hint text. My hope was that sticking a content size fitter on the hint text gameobject would automatically push other rows down. As you can see that doesn’t seem to be happening.
Here’s a screenshot of the hierarchy too for further clarity.

Many thanks and appreciate any help anyone can offer!



