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