I’m struggling with how to get descriptive device names in OpenXR – this is specifically to identify which HMD the player is using to load the correct visual controller models for their headset.
With OculusSDK this code would return a useable name:
// Get Headset Name
UnityEngine.XR.InputDevice headDevice = InputDevices.GetDeviceAtXRNode(XRNode.Head);
string hmdName = headDevice.name;
I know there isn’t really any good method out there to find out what each headset’s manufacturer internally names their piece of hardware – making discovering all of the names for a headsets a major headache unless you already own all of them. From a variety of sources I was able to gather this list which worked well before I switched to OpenXR:
/// <summary>
/// Static utility class contains the names of all the HMDs (I know of).
/// </summary>
public static class KnownHMDNames {
// Strings may slightly differ, e.g. "Vive. MV" or "Vive MV.", and not just per OS
public const string model_vive = "Vive MV";
public const string model_vive_pro = "VIVE_Pro MV";
public const string model_lenovoExplorer = "Lenovo Explorer";
public const string model_hpWindowsMixedReality = "HP Windows Mixed Reality Headset";
public const string model_samsungOdyssey = "Samsung Windows Mixed Reality 800ZAA";
public const string model_acer = "Acer AH100";
public const string model_rift_cv1 = "Oculus Rift CV1";
public const string model_rift_s = "Oculus Rift S";
public const string model_quest = "Oculus Quest";
public const string model_quest_2 = "Quest";
}
Now whenever I run the same command as above this is what I get back (for the CV1 and Quest2):
“Head Tracking - OpenXR” ผ(•̀_•́ผ) ( ఠ ͟ʖ ఠ) ( ͡ಠ ʖ̯ ͡ಠ) … Ugh …
Anyone have a better method for finding out what device is attached in OpenXR?
Or even in the XRManagement parent plugin?
Being hardware agnostic is fantastic and all but this is taking it too far.
Am I up a creak without a paddle here? … This can’t be a rare thing to need to know.