Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Can't set custom resolution for multiple displays in Unity 2019

Discussion in 'Editor & General Support' started by 6KillaDann6, Oct 17, 2019.

  1. 6KillaDann6

    6KillaDann6

    Joined:
    Jan 4, 2016
    Posts:
    1
    I can't set a custom resolution for each display in Unity 2019. In previous versions of Unity, I could set a custom resolution for each display.

    Here is a screenshot of it working in Unity 2018.4.6f1.
    https://imgur.com/esmQtrL

    Here's a screenshot of it not working in Unity 2019.2.4.f1
    https://imgur.com/cp5nzWd

    Here's the setup:
    - I have a dual monitor setup.
    - Two cameras in the scene with "Target Display" set to "Display 1" and "Display 2".
    - Create two canvases in the scene
    Canvas Display 1: https://i.imgur.com/I31jrQS.png
    Canvas Display 2: https://i.imgur.com/W0fMGWf.png
    - I also added an image to each of the canvases to test the results. (One 1920x1080 image, and one 800x600 image)
    - Player Settings set up: https://i.imgur.com/cZyaTeo.png
    - In Windows Display Settings, set Display 1 to be 1920x1080 and Display 2 to be 800x600

    Create a new script and add this code:
    Code (CSharp):
    1.  private void Start()
    2.     {
    3.         foreach(Display d in Display.displays)
    4.         {
    5.             d.Activate();
    6.         }
    7.  
    8.         Display.displays[0].SetRenderingResolution(1920, 1080);
    9.         Display.displays[1].SetRenderingResolution(800, 600);
    10.     }
    This issue will affect my work as often times I have applications that e.g. Have one display in 1920x1080 and another display in 4k.

    Thanks and Regards,
    Ash
     
    Last edited: Oct 17, 2019
    Davydov_Sergey likes this.