Question by
Shredder112233 · Mar 28, 2020 at 08:17 AM ·
uicanvasscalinginterface
Unity Canvas Grid Layout - Keep cells perfect squares and fit in parent
I'm trying to make a grid layout where I have a fixed amount of rows, and a variable amount of columns. I want my grid cells to be perfect squares when the parent of the whole grid is resized. Basically something like a chess board.
Here is a picture of exactly what I'm trying to achieve:
The size of the squares should shrink as its parent rect transform changes size. I tried using a GridLayout but that requires a fixed size. I'm wondering if there's any way to do this without a custom layout script? Thank you.
Comment