Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

Differentiating between Rift and Rift S in Unity

itsafeatureitsafeature Posts: 9
Brain Burst
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

Comments

  • Skybox.xyzSkybox.xyz Posts: 36
    Brain Burst
    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!
  • Jamy4000Jamy4000 Posts: 2
    NerveGear
    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.
  • SuppleTeetSuppleTeet Posts: 25
    Brain Burst
    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.


  • SuppleTeetSuppleTeet Posts: 25
    Brain Burst
    edited June 2019
    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. 
  • joelybahhjoelybahh Posts: 1
    NerveGear
    @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 
  • SuppleTeetSuppleTeet Posts: 25
    Brain Burst
    Just realized I never said thanks, joelybahh! Works great.
Sign In or Register to comment.