Search Unity

How to adjust size of elements

Discussion in 'Scripting' started by imosek8, May 24, 2015.

  1. imosek8

    imosek8

    Joined:
    Apr 24, 2015
    Posts:
    10
    Hello! I have a problem with sizing. When I work on pc my screen resolution is 1024x1080, but when I build my game and load it into my mobile where the resolution is smaller I cant even read the text given there on the buttons or simple text like score. How to adjust it, that it would be visible on each resolution. Smaller or Higher.
     
  2. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,664
    If you use the new unity gui, your stuff can be automatically resized by setting the canvas up to scale to screen size in the inspector.
     
  3. imosek8

    imosek8

    Joined:
    Apr 24, 2015
    Posts:
    10
    I use Canvas from unity 5.0 and I set there scale to screen size. Scale with Screen Size and referenced resolution is 1024x 1080, Match width or height, match is equal to 0, pixel reference is equal to 100. Is that what you meant? If yes there is still problem with small text...
     
  4. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,664
    Hmmm I hadn't noticed any problems even on tiny android screens. Might try having the text be bigger for all resolutions, like maybe the base resolution should be the smallest possible screen size, then it will look ok scaled up to larger screens.
     
  5. imosek8

    imosek8

    Joined:
    Apr 24, 2015
    Posts:
    10
    If I have time I'll try :)