Search Unity

Question UI scaling is broken on first Game start but in editor fine

Discussion in 'UGUI & TextMesh Pro' started by sksdesign, Feb 10, 2024.

  1. sksdesign

    sksdesign

    Joined:
    Jul 26, 2023
    Posts:
    1
    Hey, my UI menu scaling is not working correctly when I build the game.

    In Editor and Game view everything seems perfect and scaling works well even when i hit play in editor.
    If I build game at the first start scaling in main menu is broken.
    When I "play" a scene and quit from this scene back to main menu the menu scaling works again.
    So only on first start before start a scene the ui scaling however isnt scaling as intended.

    Ive attached some sorted screenshots.

    What could be the reason?

    1 main menu at first start (broken scaling)
    https://pasteboard.co/Gn0GyCB3S7aN.jpg
    2 game view (correct scaling)
    https://pasteboard.co/EjMy7WgxM2iT.jpg
    3 editor view (correct scaling)
    https://pasteboard.co/51xaWKQPGWgW.jpg
    4 quit from scene back to main menu (back tin main menu its however correct again)
    https://pasteboard.co/C4NGeiVaNTtu.jpg
    5 mainmenu canvas inspector (reference resolution is overall: 1080p and match:1)
    https://pasteboard.co/NIkhX0Zqui51.jpg





     
    Last edited: Feb 10, 2024