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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Dual screen (Display 1 & 2), only display 1 shown

Discussion in '2019.1 Beta' started by paf4unity, Dec 17, 2018.

  1. paf4unity

    paf4unity

    Joined:
    Jun 11, 2017
    Posts:
    2
    Hi all,

    My project must show videos on display 1 and some 3d objects on display 2. Unfortunately, when I build my project and run it, only display 1 shown.

    Easy to reproduce:
    1. Create new HDRP project
    2. Remove sample scene
    3. Create new scene with 2 cameras, one on display 1 and the other on display 2. I put a cube ahead camera 1 and a sphere ahead the other to see difference.
    4. Build and then run it.
    Only display 1 shown.

    You can donload the zipped project at the following address:
    https://www.grosfichiers.com/BNEdg1uRflqRG


    Thanks a lot for help.
     
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,109
    Could you please submit a bug report for this issue?
     
  3. dpotuznik

    dpotuznik

    Joined:
    Jan 18, 2018
    Posts:
    17
    hi

    if i check the variable on my 2 monitor setup "Display.displays.Length" should be 2 ?
    but it's return always 1 on unity 2019.1a12
    it is normal ?

    can we fix that ?

    i have 1 rtx 2080 ti on 2 monitor Benq 32 and Asus 27

    Thank you for your help.
    Best Regards
     
  4. dpotuznik

    dpotuznik

    Joined:
    Jan 18, 2018
    Posts:
    17
    Hi,

    By forcing the second screen to activate it work...
    not elegant, but it work;)

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class DisplayScript : MonoBehaviour
    5. {
    6.     // Use this for initialization
    7.     void Start()
    8.     {
    9.         Debug.Log("displays connected: " + Display.displays.Length);
    10.         // Display.displays[0] is the primary, default display and is always ON.
    11.         // Check if additional displays are available and activate each.
    12.         //if (Display.displays.Length > 1)
    13.         Display.displays[1].Activate(2560,1440,60);
    14.     }
    15.  
    16. }