Multiple unity programs on a single host display on multiple monitors

Source: Internet
Author: User

Record a pit.

Recent projects require a host with multiple monitors, and then run multiple unity programs.

1. Connect the monitor, set to Extended mode.

2. Write the Code,

Using Unityengine;public class mydisplay:monobehaviour{    [Serializefield] public    int displayindex;        Monitor number    void Awake ()    {        if (Display.displays.Length > 1)        {            Display.displays[displayindex]. Activate (0, 0,);        }        Screen.setresolution (Screen.width, Screen.height, True);}    }

3. Hang the code on top of the camera and set the monitor number in turn.

4. The key step is to set the target display of the camera, the display in the upper left corner of the game window, and, if there is a canvas, the display of the three display

5. The display Resolution dialog in Playersetting,resolution and presentation is set to Disabled.

6. Pack it up.

7. Write a VBS script that starts with a delay and will need to launch the program inside. Save, double click to execute, no error will execute the corresponding program.

Dim Delayerset Delayer = CreateObject ("Wscript.Shell") wscript.sleep 10000//delay time delayer. Run "C:\Users\AhrenLi\Desktop\ShowPhotos5.exe"//program path, do not have a space wscript.sleep 10000delayer. Run "C:\Users\AhrenLi\Desktop\ShowPhotos4.exe" Wscript.Sleep 10000delayer. Run "C:\Users\AhrenLi\Desktop\ShowPhotos3.exe" Wscript.Sleep 10000delayer. Run "C:\Users\AhrenLi\Desktop\ShowPhotos2.exe" Wscript.Sleep 10000delayer. Run "C:\Users\AhrenLi\Desktop\ShowPhotos1.exe" Set delayer = Nothingwscript.quit


Multiple unity programs on a single host display on multiple monitors

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.