Search Unity

SetResolution doesn't work correct in Unity 2108

Discussion in 'Editor & General Support' started by GiftedMamba, Jun 9, 2018.

  1. GiftedMamba

    GiftedMamba

    Joined:
    Feb 25, 2017
    Posts:
    46
    Hi All!
    My application uses screen resolution 1920x2205. In Unity 2017 i used the next function to set this resolution at runtime:

    Screen.SetResolution(1920, 2205, true);

    It works. No matter, what resolution user changed before starting th application, it will be cahnged to 1920x2205.

    I upgraded to Unity 2018, and now this function doesn't work correctly. Now it changes resolution only for current screen resolution in windows.

    Anyone has ideas about?
     
    Last edited: Jun 9, 2018
  2. GiftedMamba

    GiftedMamba

    Joined:
    Feb 25, 2017
    Posts:
    46
    Well, if someone will has the same problem, i found how to fix it:

    Screen.SetResolution(1920,2205,FullScreenMode.ExclusiveFullScreen);

    (And yes, i have this checkbox ON in playersettings)
     
    Last edited: Jun 9, 2018