Search Unity

Canvas scaler is making all elements small on project build but not on unity editor

Discussion in 'Editor & General Support' started by haruhi4, Feb 22, 2019.

  1. haruhi4

    haruhi4

    Joined:
    Jul 11, 2016
    Posts:
    7
    I'm producing a Unity game on Unity 2018.2.7f1 that I want to be played in different resolutions. For that purpose, I'm using a canvas scaler on all my canvases that i use on any of my scenes. On every canvas, the UI scale mode is set to "scale with screen size" and it's reference resolution is x=800 and y=600. Also, the Match from the Canvas scaler component is set to zero and the reference pixels per unit is set to 100.

    On the unity editor, when I click Play, if the screen is maximized or not, the game is perfect and all elements are big like in the annex "gameScreenOnUnityEditor.png".

    When I build my project, i notice a change on the screen elements. If I choose a resolution of 1280x720, the game looks great and all the elements are big, just like on the "gameScreenBuild1280x720.png" annex.

    But when I select another resolution... like the 800x600, I notice the elements are really small, like in the annex
    "gameScreenBuild800x600.png". Why does this happen, since I put on Unity that the reference resolution is 800x600?

    I have already tried to change the Match from the canvas scaler to 0.5, but then all the elements on the screen became small even on Unity editor.

    How can I adjust my game so that it will not make the elements small on a 800x600 resolution?
     

    Attached Files: