Switching Project from Oculus Rift to HTC Vive

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?

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.

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 :slight_smile:

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.