Search Unity

Is GridLayout's cell size supposed to ignore ReferenceResolution?

Discussion in 'UGUI & TextMesh Pro' started by Paniku, Nov 24, 2014.

  1. Paniku

    Paniku

    Joined:
    Apr 11, 2013
    Posts:
    24
    EDIT: CanvasScaler in the updated versions has this effect as well

    Say your cell size was 100,100 and your canvas had a ReferenceResolution attached to scale to the size of the screen. Most other UI components scale but the cell size in GridLayout would stay at 100,100 no matter the size of the screen, meaning in some cases the elements will overlap each other since the children of the GridLayout itself have been scaled but the cell size hasn't.

    Is this intended?
     
    Last edited: Nov 24, 2014
  2. runevision

    runevision

    Joined:
    Nov 28, 2007
    Posts:
    1,892
    The CanvasScaler works by scaling up (or down) the whole coordinate system. So UI elements keep their sizes in units, but each unit is larger or smaller.

    So it's expected that if the cell size is set to 100x100 then it should stay at 100x100 regardless of what CanvasScaler is doing, but the cells should still grow (or shrink) based on Canvas scaleFactor, since the 100x100 units will be larger or smaller. If that's not what you're seeing, then we'll more details on this - like a bug report with repro project and repro steps.