Search Unity

How To Show Right/left Eye From Steamvr On Monitor

Discussion in 'AR/VR (XR) Discussion' started by aoleynikov678, Apr 11, 2019.

  1. aoleynikov678

    aoleynikov678

    Joined:
    Aug 12, 2015
    Posts:
    8
    Hi everyone,

    I need to make choice to render left or right eye on monitor for my Vive VR application. I use Steam VR v 1.2.3 and Vive Input Utility (for comfortable trackers managment). As I understand Steam VR has hardcoded left eye and has no API to change it. I found this thread for old Unity versions (5.4-): https://forum.unity.com/threads/exp...howing-for-desktop-window-for-steamvr.480358/, but I use Unity 2018.3.

    I also found that you can change eye in editor for playmode. Maybe Unity has some method for doing this in build?

     
  2. aoleynikov678

    aoleynikov678

    Joined:
    Aug 12, 2015
    Posts:
    8
    Thanks to @LucentGames, i finally used
    Code (CSharp):
    1. UnityEngine.XR.XRSettings.gameViewRenderMode = UnityEngine.XR.GameViewRenderMode.RightEye;
    and it works in build (not in editor)
     
  3. Federica_96

    Federica_96

    Joined:
    Feb 19, 2021
    Posts:
    30
    Hi @aoleynikov678,
    I'm having the same problem with Unity 2019.4.11

    Where did you find this line of code? I can't find it anywhere in my project.
    Or where did you put it?

    Thank you
     
    Last edited: Feb 19, 2021
  4. alexsunny123

    alexsunny123

    Joined:
    Oct 2, 2020
    Posts:
    3

    thanks my issue has been fixed.