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

Resolutions and Refresh rate issues in build.

Discussion in 'Editor & General Support' started by Chris-Trueman, Oct 12, 2017.

  1. Chris-Trueman

    Chris-Trueman

    Joined:
    Oct 10, 2014
    Posts:
    1,256
    I am trying to make an options menu that the user can change the resolution from. In the editor it defaults to the correct native resolution and refresh rate(1920x1080 @ 60hz) and shows the correct resolution and refresh rate in the resolution drop down.

    Once I build the game it runs at the proper native resolution and refresh rate, but it doesn't show that in the drop down. I then try to change the resolution to the closest one(1920x1080 @ 59hz) and update the resolution, it reverts back to the native resolution and refresh rate when I rerun the game.

    I have a dual monitor setup and I don't know if that is causing the problem in the build. Any suggestion are greatly appreciated.
     
  2. Chris-Trueman

    Chris-Trueman

    Joined:
    Oct 10, 2014
    Posts:
    1,256
    Nobody experience this issue?
     
  3. Laumania

    Laumania

    Joined:
    Jun 27, 2012
    Posts:
    199
  4. mrmcduck

    mrmcduck

    Joined:
    Nov 26, 2015
    Posts:
    26
    Having similar issues, very weird way Unity handles this, also pretty much zero information from their side.

    What seems to be the case is that the refresh rate is ignored if you use Fullscreen Window instead of Exclusive Fullscreen (hence you get different values in the Editor). Depending on your target platform Exclusive Fullscreen might be an outdated concept anyway (talking about PC), so you can just skip it and only allow Fullscreen Windowed + maybe Windowed, depending on your game and just ignore the refresh rate.

    If you need Exclusive Fullscreen, my best bet would be to do not allow the player to set it and just go with what you want, so either the highest possible or 30/60 for consoles/mobile.

    Another thing I read is that it behaves differently/only works at all (couldn't get more specific information) if VSync is on, but I didn't test that so I cannot tell if it's true or not.
     
  5. sitterheim-svg

    sitterheim-svg

    Joined:
    Sep 5, 2018
    Posts:
    3
    In all fullscreen modes other than "exclusive" the refresh rate will be that of whatever refresh rate your desktop runs. Because as the FullScreenMode enumeration's names imply, anything but "exclusive" is running in a window even if you can't see the window title and borders.

    It's only exclusive fullscreen mode that allows setting the refresh rate manually (unless overridden by driver settings).
     
    mikeohc and chadfranklin47 like this.