Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    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. FloBeber

    FloBeber

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