Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug Reduced window resolution is preserved when switching to full-screen mode

Discussion in 'General Graphics' started by Develax, Mar 12, 2022.

  1. Develax

    Develax

    Joined:
    Nov 14, 2017
    Posts:
    67
    Unity version: 2020.3.26f1 LTS
    can be reproduced in other versions too

    Reproduction:


    - Run the build (in fullscreen by default):
    upload_2022-3-12_21-51-22.png

    - Go to windowed mode (Alt + Enter):
    upload_2022-3-12_21-51-57.png

    - Resize the window with the mouse so that its resolution is reduced (let's say to 500x500 pixels)
    upload_2022-3-12_21-48-56.png

    - Go back to fullscreen mode (Alt + Enter)
    upload_2022-3-12_21-49-54.png


    Actual results:
    - When going back to fullscreen mode resolution is being keept 500x500 pixels.
    - Scene is rendered in 500x500 pixels (the text is blurry and the canvas is squared).
    - Both Screen.currentResolution & Screen.width/height have 500x500 values.

    Expected results:
    - Fullscreen-mode should restore the game resolution back to 1920x1080 (as on the very 1st screenshot before going to windowed-mode).
    - Both Screen.currentResolution & Screen.width/height should have the values of 1920x1080.

    ---
    The problem caused by this behaviour (or bug) is that the user cannot return to full-screen mode with full display resolution after switching to windowed mode and reducing the window size.

    I haven't found anything about this behavior in docs.
     

    Attached Files:

    Last edited: Mar 12, 2022
  2. Develax

    Develax

    Joined:
    Nov 14, 2017
    Posts:
    67
    So, here we have at least 1 bug.

    Screen.currentResolution docs says:
    Returns the current screen resolution (read only). If the player is running in windowed mode, this returns the current resolution of the desktop.

    As you can see on the last screenshot it doesn't return the current desktop resolution.