- Home /
Multimonitor display in Unity3D 4.1 and above...
Hi,
Is there anybody who has experience with new (4.1 and up) Display class and proper displaying of multiple cameras on multiple monitors. Is this feature really working on standalone Windows apps? Here is what I do:
if(Display.displays.Length > 1)
{
Display.displays [0].Activate (); //not neeeded because it is main
Display.displays [1].Activate ();
CameraMain.targetDisplay = 0;
CameraUI.targetDisplay = 1;
}
Display.displays.Length is 2 but second monitor won't activate and display no content. Another thing I found is Display.MultiDisplayLicense()
but there is no real description for this. It is set to false
and maybe this is the reason why this all is not working. What really is Display.MultiDisplayLicense()
? Anybody knows what to do?
Please help me guys and I'll be really appreciated!
Best, Pablo
Bump... I am also finding this a problem in unity 5 Anyone got a solution for a multiple monitor environment / build on Win 7?
$$anonymous$$y solution was to run a windowed version over two screens and use the Zoom functionality of $$anonymous$$acOSX to fake the full-screen effect. It's not ideal, but it worked.
Answer by NikkiH · Jan 05, 2016 at 12:07 AM
Hi, I also have trouble using multi-display. When I open my game whereby Player 1 is on Display 1 and Player 2 is on Display 2, my right screen is white and does not show Display 2. Do I need to set my resolution to 3360x1050? I am using 2x 1680x1050 monitors.
This is my code: using UnityEngine; using System.Collections;
public class AddMonitor : MonoBehaviour {
// Use this for initialization
private void Awake()
{
if(Display.displays.Length > 1)
{
Display.displays[0].SetRenderingResolution(1680, 1050);
Display.displays[1].Activate();
Display.displays[1].SetRenderingResolution(1680, 1050);
}
}
}
@Geo.Ego I didn't managed to work with your solution with the "Command line arguments" therefore I want to try Mutli-Display, http://docs.unity3d.com/Manual/MultiDisplay.html
Answer by maxmp · Oct 04, 2016 at 05:11 AM
Hi All (@owntheweb, @NikkiH, @Geo),
I have had this working well for a while now.
In addition to the code above, you need to call you unity build from the command line with the following argument '-multidisplay' in order for the game to spin out multiple windows, for example: -multidisplay
I have this working over 4 displays at full screen 1920x1080. Hope this helps people.
Regards
Max
Hi $$anonymous$$ax,
I am not very familiar with how to use command line, could you perhaps elaborate?
Hi @NikkiH,
You will need to read up on how to navigate at command line, there are lots of online resources you can learn this from. $$anonymous$$y examples below show the commands between quote marks, so please dont enter these.
Assu$$anonymous$$g your on a windows platform: Open command prompt by hitting 'Start' and type 'cmd' then hit 'Enter'.
Typically to change drive is 'c:' in the case of C drive or 'd:' in the case of a D drive. Change to the drive your unity build is on by entering the correct varient from above and hitting 'Enter'.
You will then need to change directory to where your build is stored, to do this use the command 'cd ' for example if it is on your desktop try 'cd c:\Users\NikkiH\Desktop' and hit 'Enter' if all is well then this will now be in the correct folder. (TIP: Use the 'Tab' key to autocomplete long file paths, after each '\' hit 'Tab' to cycle through possible folders).
You can check folder contence using the 'dir' command followed by hitting 'Enter'.
To run in multi monitor mode: Type the full path to your file and include the '-multidisplay' switch, for example: 'c:\Users\NikkiH\Desktop\TestBuild.exe -multidisplay' and hit 'Enter', this should now launch your Unity player, select your resolution (normally native resolution or what you set in your code) and it will activate the extra displays.
Your answer
Follow this Question
Related Questions
Multidisplay: 1 camera output over 3 fixed displays 2 Answers
Can I display my screen on Unity? 1 Answer
Find which display game is on 0 Answers
Monitor or screen output onto a game object. 1 Answer
Multi-display with 16 displays 1 Answer