Search Unity

Multidisplay Troubles

Discussion in 'General Discussion' started by L0tan, Apr 1, 2021.

  1. L0tan

    L0tan

    Joined:
    Jul 16, 2017
    Posts:
    75
    I have two objectives:
    - Main objective, achieve to have Unity ONLY on the second and third monitor (which seems impossible since Unity auto-enables display[0] which is the main one, correct me if I'm wrong).
    - Second Objective, do not loose window controls to minimize windows on multidisplay, to minimize one of the displayed window.

    I'm trying different setups and configurations, but multidisplay feature always smacks me in the face, a picture is worth a thousand words:

    upload_2021-4-1_18-19-11.png


    The following image is achieved using this script, notice that the second monitor is displaying a black window, with a grey one and INSIDE the unity secondary display camera:

    Code (CSharp):
    1. using UnityEngine;
    2.  
    3. public class ActivateSecondaryDisplay : MonoBehaviour
    4. {
    5.     private void Awake()
    6.     {
    7.         if (Display.displays.Length > 1)
    8.         {
    9.             Display.displays[1].Activate();
    10.             Display.displays[1].SetParams(512, 256, 1920/2, 1080 / 2);
    11.         }
    12.     }
    13. }
    14.  
    With this Player Settings:
    upload_2021-4-1_18-25-48.png

    And launching the .exe with and without -multidisplay or -popupwindow command.

    So...what is wrong with multidisplay feature? ^^'

    Edit: working on standalone, Unity 2019.1.14f1
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Unless things recently changed, multi display only supports full screen on all displays. Trying to force window mode or other screen sizes is likely to produce bad results. I don't think there is anything wrong with the feature, just that it is a very simple design not intended for your use case. All the feature does is let you add additional full screen displays. It isn't designed for disabling any displays, it isn't designed for window mode, etc.

    Here's the thread with the most info.
    https://forum.unity.com/threads/multi-display-windowed-mode.429757/

    If you need regular single display controls or window mode over all displays, you should investigate multiple separate builds which communicate over IP.
     
    L0tan and Ryiah like this.
  3. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    L0tan likes this.
  4. L0tan

    L0tan

    Joined:
    Jul 16, 2017
    Posts:
    75
    Thanks for your time @Joe-Censored .

    I can understand some limitations, but I can't understand the limitations of having to be forced to use the main display you liked or not, seems basic for a multidisplay mode, I can't believe that I'm the only one that thinks like that cause there are more posts from 2016 to today demanding this feature.

    So yes, it's a simple very simple feature, but still have issues to solve.

    The only workaround I've found (on Windows) is to change (once the .exe is already running) the main display from Windows System controls, but it's a very choppy solution, there is no command to initiate Unity on a diffetent display?

    Thanks!