Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Differentiating between Rift and Rift S (Solved)

Discussion in 'AR/VR (XR) Discussion' started by joelybahh, Jul 8, 2019.

  1. joelybahh

    joelybahh

    Joined:
    Mar 18, 2015
    Posts:
    66
    Currently unity Standalone VR does not return the correct value for XRDevice.model.

    Both the Rift S and the Rift CV1 return "Oculus Rift CV1".
    However, there is a way you can distinguish between the two.

    The Oculus Rift S has a refresh rate of 80, while the old rift has a refresh rate of 90.
    To determine if the headset that is connected is a Rift S or a regular Rift you can use the code below.
    Code (CSharp):
    1. if(XRDevice.model.Equals("Oculus Rift CV1"))
    2. {
    3.     if(XRDevice.refreshRate <= 80)
    4.     {
    5.          // Oculus Rift S
    6.     }
    7.     else
    8.     {
    9.         // Oculus Rift CV1
    10.     }
    11. }
     
    liuyang61, LucasRizzotto and ROBYER1 like this.
  2. FlorianBernard

    FlorianBernard

    Joined:
    Jun 9, 2015
    Posts:
    107
    Very helpful. Thank you for sharing! ;)
     
unityunity