Search Issue Tracker

Fixed

Votes

15

Found in

5.3.4f1

Issue ID

786492

Regression

No

Display.displays.Length outputs wrong display count in Editor console

Window management

-

Steps to reproduce:
1. Download and open the attached project
2. Open scene "DisplayTest"
3. Open second Game view
4. Set to display 2
5. Enter Play mode
6. Notice console outputs "Number of Displays: 1".

Notes:
Also Display.displays.Length outputs "Number of Displays: 1", even if Unity editor is running in 2 displays.

Reproduced with: 5.3.0f1, 5.3.4p2, 5.4.0b14.

  1. Resolution Note:

    This behavior is currently by design, The editor does not have multiple display support.
    In the Editor we do not use Displays but GameViews to render. Unfortunately, using GameViews to emulate Displays carries several issues.
    Multiple GameViews can be used for a single Display Id and can all have different aspect ratios and resolutions.
    To support this requires a refactor of the current Display system and is considered a feature request.

Comments (6)

  1. Sliem001

    Sep 09, 2020 08:06

    Unity 2020.2.0b1 Beta
    Problem still exists.
    Its important that we reccive a fix!!

  2. highlyinteractive

    Aug 18, 2020 17:06

    I had a go at solving the issue with a native plugin: https://github.com/highlyinteractive/UnityDisplayInfo

    It's Mac only at the moment, but I'll try to add a PC version soon

  3. highlyinteractive

    Aug 13, 2020 14:16

    Still an issue in Unity 2020.1.2f1

    It would be so useful to at least return the number of system displays in the editor.

  4. Roman-Ilyin

    Feb 14, 2018 15:57

    same issue in 2017.3

  5. AlexBarrington

    Nov 01, 2017 00:17

    This is still an issue in Unity 2017.2!

  6. rbmcginnis

    May 12, 2017 14:13

    Display.displays.Count() also fails. Running a 1080TI graphics card and displaying on three 70" televisions.

    Function always returns 1.

    Laptop with an external monitor returns 2.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.