Dual screen and resolution

Hello,

we are currently trying to setup unity to render full screen on two monitors. I know that our approach is a hack, but we got already some promising results, there’s only one problem left.

We have two screens atop eachother that together display the game. The resolution of these two screens are 1280x720, so together we need a screen of the size 1280x1440. So we’d like to create a window with that size.

Unity will create a window that fits in that resolution, but is effectively smaller because of the borders that need to be added (5%). With a call to SetWindowPos we remove the borders and set the size of the window to 1280x1440. This works perfectly, however, the Screen.width and Screen.height values remain the same off course. I’d like to change these values to 1280x1440, but I cannot do this with the call Screen.SetResolution because that one adds the borders again. (It overrides the style that was set).

Is it possible for me to set the Screen.width and Screen.height another way, or (which works for me too) is it possible to tell Unity not to reset the style of the window when executing Screen.SetResolution?

Thanks,

Alex Vanden Abeele

hello Alex,
I had the same issue for month… and i finally fiound a way to do that. the trick is to call the SetResolution funct at start. then at the second frame update you can call SetWindowPos.

So it fits in that resolution but you’re right screen.width and screen.height are still 1280x1440 with 5% less :frowning:

But that’s exactly what I want to solve, I want a resolution of 1280x1440 and nothing less. The resolution may not be less because I see artifacts if that’s the case.

In the next release in Unity 3.4 you will be able to create borderless windows with the -popupwindow commandline argument.

Sweet! :slight_smile:

Great! Thanks