- Home /
Is there a way to force unity5 to open up on the operating systems main monitor?
For my app I must make sure the build opens up on Windows 8s / 10s primary monitor always, like it did in older versions of unity (when using 2 or more screens).
Unity lets players choose which monitor to use (which is great, but just not in my case), but by default it seems to just use the left one - even if the right one is the primary.
Sadly, I have found no way to make sure it starts only on the primary screen.
I'm really grateful for any hints, thanks a lot! Kind regards, Chris
Answer by tanoshimi · Feb 22, 2016 at 11:14 PM
Are you explicitly setting the targetDisplay=0 property of the camera?
http://docs.unity3d.com/ScriptReference/Camera-targetDisplay.html
Thanks, I tried using targetDisplay and the Display class. The problem is, that the 0 $$anonymous$$onitor is not the operating systems primary monitor - it is simply the left monitor in my case, while the primary monitor is the one on the right. Thats the same with "Select monitor" in the resolution dialog: 0=left, 1=right. But there's no way to deter$$anonymous$$e which monitor is the operating systems primary monitor.
I need a way to always open the app on the operating systems' primary screen - the way games on s$$anonymous$$m open, for example.