When developing my debug panel tool (SRDebugger) I had need of a FlowLayoutGroup which could handle oddly sized objects and resizing correctly. I’ve published it in my open source library SRF, in case anyone else has need of something similar.
Here is a video to demonstrate how it behaves:
It supports all child alignments, and ContentSizeFitter. If ChildForceExpandWidth is selected then items will be stretched to fill a row, and if ChildForceExpandHeight is selected then all items in a row will be stretched to be the same height as the largest item.
Thanks for sharing this. This is exactly what I needed for my interface. I struggled with trying to do something similar before they open sourced the ui but it was the fails.
Hi @SimonDarksideJ , I’m happy to have it included in your UI Extensions repo. Could you attribute it to Stompy Robot LTD and link to the github page in FlowLayoutGroup.cs, and the notes column in the readme?
I’ve done some changes to this - I’ve added separate X and Y spacing and an option to automatically and equally stretch the spacing, not the child width. Anyone interested?
I’m running into an issue where if you have one element on the grid on its own row, using and of the Center or Right options will cause the element to not be positioned as expected. Any ideas what would need to change in this script so they aligned themselves properly? Seems to have something to do with the Spacing on X. It should be noted that it having more than one item seems to work just fine.