Search Unity

2019.1.0f2 Seconday Display Canvas Scale Problem

Discussion in 'General Graphics' started by ASIM-SENYUVA, May 17, 2019.

  1. ASIM-SENYUVA

    ASIM-SENYUVA

    Joined:
    Apr 29, 2013
    Posts:
    90
    Hello,

    I try to proof of concept for main and secondary display application based on Windows platform. I made this before but I saw a big problem on Unity3d 2019.1. On the editor side, there is no problem for Canvas UI elements and scale operation. I can see perfectly all UI items for defined cameras. But Unity3d 2019.1 scale wrongly when I build it. the same project works perfectly on unity3d 2018.

    I tested small code on Unity3d 2019.1.0f2 and 2018.3.0f2 versions. results are different.

    you can reference at the images. Unity3d make the wrong scale for 2019.1 version for a secondary display.

    upload_2019-5-17_12-54-49.png

    Code is below

    Code (CSharp):
    1.     void Start()
    2.     {
    3.         Screen.SetResolution(5760, 1080, FullScreenMode.FullScreenWindow, 60);
    4.  
    5.         if (Display.displays.Length > 1)
    6.         {
    7.             Display.displays[1].Activate(1920, 1080, 60);
    8.             Display.displays[1].SetRenderingResolution(1920, 1080);
    9.         }
    10.     }
     

    Attached Files:

    • 1.jpg
      1.jpg
      File size:
      276 KB
      Views:
      533
    • 2.jpg
      2.jpg
      File size:
      315.9 KB
      Views:
      560
  2. ASIM-SENYUVA

    ASIM-SENYUVA

    Joined:
    Apr 29, 2013
    Posts:
    90
    Update Unity3d 2019.1.0f1 still same.
    Screen Shorts at the attachment Unity3d 2018 work well but 2019 make problem on Canvas Scaler.

    İt looks a unity3d bug.

    test code
    Code (CSharp):
    1.     public Text Res;
    2.     public Text Refr;
    3.     // Start is called before the first frame update
    4.     void Start()
    5.     {      
    6.         if (Display.displays.Length > 1)
    7.         {
    8.             Display.displays[1].Activate();          
    9.         }
    10.     }
    11.  
    12.     // Update is called once per frame
    13.     void Update()
    14.     {
    15.         Res.text = "renderingWidth - renderingHeight :" + Display.displays[1].renderingWidth.ToString() + " - " + Display.displays[1].renderingHeight.ToString();
    16.         Refr.text = "systemWidth - systemHeight : " +  Display.displays[1].systemWidth.ToString() + " - " + Display.displays[1].systemHeight.ToString();
    17.     }
     

    Attached Files:

  3. ASIM-SENYUVA

    ASIM-SENYUVA

    Joined:
    Apr 29, 2013
    Posts:
    90
    its works normal when i disable surrond.
    my normal setup is below

    3 monitor surround : total resulation is 5760x1080
    1 monitor accesory : total resulation is 1920x1080

    After apply surround, its wrongly scale on unity3d 2019 but works on 2018
     
  4. ASIM-SENYUVA

    ASIM-SENYUVA

    Joined:
    Apr 29, 2013
    Posts:
    90
    problem solved when I change DirectX11 to DirectX12.
    but DirectX12 still experimental on Unity3d. I think its a deep issue. Do you have any idea about this?
     
  5. GreenDinoBV

    GreenDinoBV

    Joined:
    Oct 2, 2012
    Posts:
    3
    We have the same issue. In our case we have a multi display setup with mixes in portrait and lanscape. Since Unity 2019.1 it only works correct for 1 orientation and not for the other one, the canvas scaler is definitely broken here. Same project works fine with Unity 2018.3.
     
  6. MarkGreenDino

    MarkGreenDino

    Joined:
    Jan 15, 2018
    Posts:
    3
    I can confirm that by using DirectX12 this issue is fixed. But by using the experimental DirectX12 I ran into a lot of other issues. For example, multi display camera's dont work anymore.