cancel
Showing results for 
Search instead for 
Did you mean: 

Differentiating between Rift and Rift S in Unity

itsafeature
Explorer
Hi,

I'm in the process of adding Rift S controller UI to our game to bring it inline with the quest version but i am struggling to differentiate in code between the Rift and the Rift S. 

I'm running the latest Oculus Utilities but when I check the device model its listed as an Oculus CV1

rhy70pl1hhmn.png

Any suggestions or help would be great.

Thanks
6 REPLIES 6

Skybox.xyz
Protege
We encountered the same issue.
Found this to-do line in the code...
zi2naw9lsm0l.png

@NinjaGaijin
Shall we differentiate Rift / Rift S via productName please?
Any advice would be appreciated.

Thanks!

Jamy4000
Honored Guest
Hi there ! 
Any update on this ? I'm actually looking for a way to differentiate a Rift S from a Rift, but using the native unity support (Without OVRPlugin). I do think this thread could help me though, as OVRPlugin seems to use the same naming as the one in XRDevice.model.

Anonymous
Not applicable
Looks like since this post support was added to Oculus version 1.37 on 2019-05-20 (itsafeature was using 1.36)
https://developer.oculus.com/downloads/package/unity-integration/1.37.0/

And as of today, 2019-06-24, the latest Oculus package available in the Unity Package Manager is 1.36... so I'm afraid we're waiting on Unity here for Unity Native.


Anonymous
Not applicable
I stand corrected. I manually updated to 1.28 and OVRPlugin.productName is still returning Oculus Rift CV1... sad face
sjmzp3ijc455.png
That 1.37 update says "The 1.37 Oculus Integation for Unity adds development support for the Rift S headset."  Not sure what they did. 

Anonymous
Not applicable
@SuppleTeet Check XRDevice.refreshRate.

The Rift S has a refresh rate of 80, and the CV1 has a refresh rate of 90.

Unity logs 79.999 in the console, however, you can simply check if the model contains Oculus Rift CV1 and if the refresh rate from the device itself is less than or equal to 80. It's a hack but it's a way for now 🙂 

Works for people using Unity Standalone VR as well 😄 

Anonymous
Not applicable
Just realized I never said thanks, joelybahh! Works great.