Hi,
My final goal is to use a horizontal scroll view, with its content having an horizontal layout group and it’s size driven by a content size fitter to grow along all its children size (width) + When resizing my Main Panel I want my swipable (in the scroll view) content’s children (Panels actually) to stretch along so one children fill all my screen width no matter what it is.
I make this simple UI hierarchy as an example :
Main Panel
–Content Panel (Horizontal Layout Group[Child Control Size : width:V, height:V], content size fitter[horizontal: preferred size])
----Image(Layout element(Flexible width:1)
---- …
---- (duplicate)Image(Layout element(Flexible width:1)
I want my panel content size (width) to fit along with all its child Image size (width), so I’m using a content size fitter with horizontal set to preferred size. So when I duplicate my Image my Content Panel width grow.
+
I want My Images to stretch along my Main Panel. So if i increase Main Panel width, I want all my Images width to grow along, and as consequence my Content Panel width grow too along the sum of all images width.
Tried different setting (Child force expand, flexible width:0 + fixed width, trying to setting rectTransform anchor preset to stretch for all my elements, …) But I cannot achieve both feature.