Set Target Device and Get Device at Runtime in Unreal Engine

When you create apps that target both Quest and Quest 2, you can set the target device(s) when you create the app and check the device that app is running on. You can then enable extra features to improve the user experience for apps running on Quest 2. For example, you can add more objects to a scene on Quest 2, to take advantage of its faster GPU.

An app is assumed to target Quest unless you include an Android manifest entry that indicates it also supports Quest 2. As a result, the Oculus mobile runtime defaults to reporting the current device is a Quest and maximizes compatibility by modifying internal behavior as needed to best run on Quest devices.

This topic covers how to set the target device in Unreal Engine and get the device type at runtime.

Add Quest 2 to the Manifest

To indicate an application supports Quest 2, the following entry should be added to the Android manifest, which can be done with Project Settings in Unreal.

<meta-data android:name="com.oculus.supportedDevices" android:value="quest|quest2"/>

To add this entry:

  1. In Unreal Engine, go to Edit > Project Settings.
  2. Under Platforms, select Android and scroll to Advanced APK Packaging.
  3. For Package for Oculus Mobile Devices, add array entries for Quest and Quest 2 to target both device types. The following image shows an example.


Then when you package the app for Android, the Android manifest will be modified to contain the Quest/Quest 2 entry:

<meta-data android:name="com.oculus.supportedDevices" android:value="quest|quest2"/>

If this manifest entry isn’t present, regardless of SDK headers or other factors, the runtime will respond with Quest as the current device type.

Check Device with the Get Device Type Blueprint

You can get the device type at runtime with the Oculus Get Device Type blueprint, which was added in v17 of the Oculus integration. This is the correct way to perform device type checking on Oculus devices within Blueprints. The Get Device Name blueprint has been deprecated.

The Get Device Type node looks like the image below, and is enum-based. You can check for Oculus Quest or Oculus Quest 2.

You can find the implementation in the OculusFunctionLibrary , in the Oculus branch of the Unreal Engine source code.


To access the source code in the Oculus GitHub repository, you must be logged in to GitHub and subscribed to the private EpicGames/UnrealEngine repository. See UE4 on GitHub for details. Otherwise, you will receive a 404 error when you try to access the repository links. An Unreal license is not required.

Check in Code

You could also check the headset type in code by using the OVRPlugin ovrp_GetSystemHeadsetType2(ovrpSystemHeadset* systemHeadsetType) function and compare the result to the ovrpSystemHeadset_Oculus_Quest_2 enum value, which is the value used for Quest 2.

Avoid Android APIs

You should not use the Android Java API for checking the type of device type. This is NOT supported, and will always return Quest.