Skip to main content
Up and Coming
May 2, 2016

Screen.Width / .Height refers to "main monitor window" instead of Rift display(s)

Is there a way to get Screen. to refer to the Rift display instead of the main monitor display?  I do some UI work based on resolution of the monitor, and I need to know what's going on in the Rift to set it correctly.

I don't see any way of getting the resolution of the Rift screen from the current framework.

Also- it seems that input.mousePosition is based on the same Screen, meaning the main monitor.  Any way there to use the Rift screen as the basis for "Screen"?

Thanks
    This topic has been closed for replies.

    2 replies

    Inspiring
    May 2, 2016
    As you pointed out, Screen.width and Screen.height always refer to the main monitor window, not the VR eye buffers. Those aren't exposed through Unity yet, but you can get them with the Oculus Utilities (https://developer.oculus.com/downloads/game-engines/1.3.2/Oculus_Utilities_for_Unity_5/) using OVRManager.display.GetEyeRenderDesc(VRNode.LeftEye/RightEye).resolution (see https://developer.oculus.com/doc/1.3.2-unity/struct_o_v_r_display_1_1_eye_render_desc.html).
    xhonziAuthor
    Up and Coming
    May 2, 2016
    Perfect- thanks.