Currently, there is no public API available to detect App is running on Quest 1 or 2 in Oculus XR Plugin.
Could you please share the use cases for it? So we could evaluate to add this support in future Oculus XR plugin release. And maybe there are some alternative available now that I could suggest.
If you also have Oculus Integration Asset install in your project, you could use API below:
OVRPlugin.GetSystemHeadsetType()
Hi the actual case for this is due to the eye resolution scale property. Oculus Quest 2 supports higher eye resolution scale whereas Oculus Quest 1 supports not as strong as Oculus Quest 2. So it is very important that when I make a build, the application selects the resolution value depending on the Quest device.
Yeah but incase of my application, I set them manually as per scene requirements. So it is very much necessary for me to have this feature of checking which device it is.
A little hint, if you are using a Quest Pro and the method GetSystemHeadsetType() is still returning “Quest_2” instead of “Meta_Quest_Pro”, be sure to check Quest Pro as a Target Device in your Project Settings → XR Plug-in Management->Oculus.
not any more, for whatever insane reason my quest 2 now calls itself “Standalone HMD”. Great. I’m using SystemInfo.deviceModel, which tells me it’s Oculus Quest… mmm, thanks.
I think I can’t use GetSystemHeadsetType() because I’m not using the OVR plugin, unless I’m getting very confused somewhere…
If you dont want to depend on the oculus plugin you can also use AndroidJavaClass to access the android.os.Build constants, which lets you get the internal codename for the headset:
public enum HeadsetType { Quest2, Quest3 }
var build = new AndroidJavaClass("android.os.Build");
var device = build.GetStatic<string>("DEVICE");
var headsetType = device.Contains("eureka") ? HeadsetType.Quest3 : HeadsetType.Quest2;
If I remember correctly, Quest 2 devices should contain “miramar” in the same constant so that could be used to differentiate between Quest 1 and Quest 2 as well.
Thankyou. I just encountered how difficult it is to detect the specific device/controller model when using Meta OpenXR…
You can also add “seacliff” for Quest Pro.