Jump to content

What is the best way to detect the current device being used?


simonevr3

Recommended Posts

We have multiple parts of our project we wish to change depending on the device being used, e.g. we are manually doing controller models and also we have some tutorials we wish to change.

Currently using "VRModule.onActiveModuleChanged" nad "VRModuleActiveEnum" or even "XRSettings.loadedDeviceName" in Unity we can tell between the Oculus Quest and the Vive Focus 3, however, it would be nice to know what the intended way for telling which device being used is as we need to support Quest 1 & 2 and also Focus 3 and Plus.

Thanks,

Simone

Link to comment
Share on other sites

VIU is dedicated on identifying controller model for connected controller device

VRModule.GetDeviceState(ViveRole.GetDeviceIndex(HandRole.RightHand)).deviceModel

This property should tell you which device is currently used

public enum VRModuleDeviceModel
{
      // ...
      OculusTouchLeft, // Oculus 1
      OculusTouchRight, // Oculus 1
      // ...
      ViveFocusChirp, // Focus Plus
      // ...
      OculusQuestOrRiftSControllerLeft, // Oculus 2
      OculusQuestOrRiftSControllerRight, // Oculus 2
      // ...
      WaveCRControllerLeft, // Focus 3
      WaveCRControllerRight, // Focus 3
      // ...
}

(This maybe a good point that we may consider adding more HMD device model but only if there is a strong reason or strong request, in case you need to know the using device without any connected controller)

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...