Search Unity

[C#] Grid Layout Group cells have another sizes

Discussion in '2D' started by DenisWASD, Dec 10, 2016.

  1. DenisWASD

    DenisWASD

    Joined:
    Dec 10, 2016
    Posts:
    9
    Hey, how to make somthing like that:

    with Grid Layout Group in C#?
    I mean every cell has another size;
     
  2. DWit

    DWit

    Joined:
    Dec 4, 2016
    Posts:
    25
    If it is vertical only you can use Vertical Layout Group and add to it component ContentSizeFitter (set Vertical Fit to Preffered Size) and to every child add component LayoutElement and set different PrefferedHeight for each child.
     
    DenisWASD likes this.
  3. DenisWASD

    DenisWASD

    Joined:
    Dec 10, 2016
    Posts:
    9
    Thank you very much! it's exactly what i mean!