Skip to content
Discussion options

You must be logged in to vote

Unity’s built-in GridLayoutGroup uses one cell size, so it can’t do a Pinterest-style layout. In UI Extensions the closest “drop-in” is FlowLayoutGroup/TableLayoutGroup (handles mixed sizes but won’t tightly pack gaps). For a true masonry you’ll need a small custom LayoutGroup (sample below) or switch to UIToolkit’s Masonry.


Option A — “Good enough” flow (no gap-packing)

  • Add FlowLayoutGroup to the container.
  • On each item, add LayoutElement and set Preferred Width/Height (or drive via ContentSizeFitter).
  • Result: rows wrap naturally with mixed heights. Not a true masonry, but simple and fast.

Option B — True Masonry (shortest-column packing)

Drop this minimal LayoutGroup on your contain…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by SimonDarksideJ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants