[Source] FlexLayoutGroup (aka Flexbox)/ MaxLayoutElement and Other Commons

Hello guys,

Just want to share my implementation of some useful UGUI elements that was missing in default unity UI.

feel free to send me any bug/comments.

Download: kyub.uicommons_1.0
Support: raf.csoares@kyubinteractive.com
Page: www.kyubinteractive.com
License: MIT

Flex Layout Group
5296365--531735--upload_2019-12-18_16-45-42.png
5296365--531741--upload_2019-12-18_16-46-32.png

Flex Layout will act as a Horizontal/Vertical Layout until the row/collumn does not fit the element. In that case the element will overflow to next row/collumn.

Max Layout Element
5296365--531714--upload_2019-12-18_16-41-7.png

Max Layout Element is a wrapper of Layout Element that makes possible configure Max Values.
ps: If you want configure a MaxValue of a Text (or TextMeshProUGUI), Set Layout Priority > 1.

Nested Scroll Rect
5296365--531744--upload_2019-12-18_16-48-49.png

Send drag axis event not captured by this ScrollRect to its parent (if ‘Nested Drag Active’ enable).
If ScrollRect only capture Vertical Axis, the horizontal value will be sended Upward.

Linear Layout Group
5296365--531747--upload_2019-12-18_16-50-39.png

Like default Vertical/Horizontal LayoutGroup. Switch between just checking ‘Is Vertical’ Field

3 Likes

Just what I needed. That FlexLayoutGroup component should be shipped with Unity. Also always wondered why the LayoutElement doesn’t support max width/height out of the box. Great work!

1 Like