Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Switching Project from Oculus Rift to HTC Vive

Discussion in 'AR/VR (XR) Discussion' started by Pfannig, Aug 26, 2016.

  1. Pfannig

    Pfannig

    Joined:
    Jul 16, 2013
    Posts:
    2
    Hi,

    up until this point the project I'm working on (a VR only game) has been using the Oculus Rift for VR. I have been charged with switching to the HTC Vive. My colleague, who implemented the Oculus Rift support in the project, is unavailable right now. Unfortunately I haven't worked with the Oculus Rift in Unity but I have worked quite a bit with the HTC Vive in Unity.

    Is there a simple way to switch from the Oculus Rift to the HTC Vive in Unity?

    i.e. removing Oculus Rift from the project completely and adding HTC Vive support, without having to redo the whole project & all the scenes?
     
  2. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    The VR SDK list in Player Settings works as a first come, first served list of VR devices. If you have Oculus as the first SDK and OpenVR as the second SDK then the VR system will try them in that order. So if a Rift is attached we will stop at the Oculus SDK If a Vive is attached we'll skip the Oculus and move on to the OpenVR SDK. There should be no need to change or rebuild a separate app instance to support one or the other.
     
  3. Pfannig

    Pfannig

    Joined:
    Jul 16, 2013
    Posts:
    2
    Hi, thanks for the reply!

    I will try it out next week. I was asking because when i tried to get it to work last week I kept getting the error:

    "[VRDevice] Initialization of device oculus failed."

    - the HTC Vive was connected. Do i need to explicitly select the OpenVR in the list you mentioned in "Player Settings" or what could the reason for that error be?
    Maybe I just didn't see the list.

    Thanks again :)
     
  4. GoesTo11

    GoesTo11

    Joined:
    Jul 22, 2014
    Posts:
    604
    In player settings, underneath the box for "Virtual Reality Supported", you will see which SDKs are in your project. Make sure that openVR is in that list. If you are trying to support the Rift and Vive, the Rift SDK should be first and OpenVR second. That is because OpenVR supports both the Rift and Vive and you probably want the Rift to use the native SDK rather than OpenVR.