Search Unity

How do you detect if you have a Vive or Vive Pro in Unity.

Discussion in 'AR/VR (XR) Discussion' started by phileday, May 22, 2018.

  1. phileday

    phileday

    Joined:
    Feb 8, 2014
    Posts:
    85
    Hi

    Previously I've been using:

    if (((UnityEngine.XR.XRDevice.model).LastIndexOf('Vive')) == -1) {
    // It's a Mixed reality headset
    } else {
    // It's a Vive headset
    }

    I've just had someone who has a Vive Pro get in touch and say that it wasn't detecting as a Vive but a MR headset. What should I do to detect a Vive pro as well?

    Any help with this would be very welcome.

    All the best

    Phil
     
  2. TeemuMV

    TeemuMV

    Joined:
    Nov 10, 2017
    Posts:
    19
    Code (CSharp):
    1. Debug.Log(UnityEngine.XR.XRDevice.model);
    --> VIVE_Pro MV
     
  3. phileday

    phileday

    Joined:
    Feb 8, 2014
    Posts:
    85
    Brilliant :) thanks. I'll update my player now.
     
unityunity