Search Unity

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:
    62
    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. }
     
    ROBYER1 likes this.