Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
Anonymous's avatar
Anonymous
6 years ago

Differentiating between Rift and Rift S in Unity

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



Any suggestions or help would be great.

Thanks

6 Replies

Replies have been turned off for this discussion
  • We encountered the same issue.
    Found this to-do line in the code...


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

    Thanks!
  • Jamy4000's avatar
    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's avatar
    Anonymous
    I stand corrected. I manually updated to 1.28 and OVRPlugin.productName is still returning Oculus Rift CV1... sad face

    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's avatar
    Anonymous
    @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 :D 
  • Anonymous's avatar
    Anonymous
    Just realized I never said thanks, joelybahh! Works great.