I have a vertically scrollable UI panel (part of a ScrollView) that contains entries that have different heights. The entries are data records comprised of X number of fields. I have the panel scrolling properly, but I can’t get the entries to recompute their height and properly render.
I could use advice on how to structure the elements and configure the component settings to get this to work.
Here’s my current element hierarchy. I’ve tried adding a ContentSizeFitter to the Entry elements. The entries do resize, but they don’t stack up in the panel as they should. They’re placed on the top of the panel, out of view. There’s also a warning about being part of parent layout group…
Content Panel - VerticalLayoutGroup (no child force expand), ContentSizeFitter (vertical preferred size)
Entry 1 - CanvasRenderer, Image, VerticalLayoutGroup (no child force expand), LayoutElement (flex height)
Header - CanvasRenderer, TextMeshProText
Field 1 - CanvasRenderer, Image
Label - CanvasRenderer, TextMeshProText
Value - CanvasRenderer, TextMeshProText
...
Field n - CanvasRenderer, Image
Label - CanvasRenderer, TextMeshProText
Value - CanvasRenderer, TextMeshProText
...
Entry m - CanvasRenderer, Image, VerticalLayoutGroup (no child force expand), LayoutElement (flex height)
Header - CanvasRenderer, TextMeshProText
Field 1 - CanvasRenderer, Image
Label - CanvasRenderer, TextMeshProText
Value - CanvasRenderer, TextMeshProText
...
Field n - CanvasRenderer, Image
Label - CanvasRenderer, TextMeshProText
Value - CanvasRenderer, TextMeshProText