# Oculus Quest (Unreal SDK)

---

:::warning[Legacy — use OpenXR for Meta Quest]
Meta Quest is now supported through the standard **OpenXR** runtime — Epic folded the old Oculus/OculusVR integration into OpenXR. The dedicated **AR51SDK_OCULUS** plugin is **legacy**: kept compiling for existing projects, but no longer actively developed.

**For new projects, set up Meta Quest with the [OpenXR path](./htc-vive-openxr.md)** — the same AR51SDK_OPENXR plugin, using Meta Quest's OpenXR runtime. The steps below remain only for existing projects still on the Oculus plugin.
:::

## Follow the "New Project" instructions from the Quest website

Follow the instructions from the [quest website](https://developer.oculus.com/documentation/unreal/unreal-quick-start-guide-quest/)  to set up your project

:::warning
Remember to disable **Support OpenGL ES3.2** under Android ->Build. Quest projects will not work with that option ticked. Make sure to run the test under **"Meta XR Performance Window"** and select Mobile as your target platform. Also Remember to package the project for oculus using the "Package for Meta Quest devices" option.

:::

## Ensure that your project is compatible with the Android guidelines

Follow the instructions from the [unreal android guidelines](https://docs.unrealengine.com/5.0/en-US/how-to-set-up-android-sdk-and-ndk-for-your-unreal-engine-development-environment/)  to get setup up your project

## Download and extract Meta Unreal Plugins into the Plugins folder

Download Meta's plugin from [meta unreal plugin](https://developer.oculus.com/downloads/package/unreal-engine-5-integration/). Extract the plugin into the project "Plugins" folder and restart the Unreal editor.

## Try to use "Meta XR Performance Window" to set the project with the recommended settings

It is recommended to use "Meta XR Performance Window" and follow their suggestions.

![Oculus Quest (Unreal SDK) — Unreal meta performance window](../img/unreal_meta_performance_window.png)

## Remember to check the "Package for Meta Quest Devices" option.

When you package your quest device do not forget to tick the "Package for Meta Quest Devices".

Under **"Android" -> "Advanced APK Packaging" -> "Package for Meta Quest Devices"**

![Oculus Quest (Unreal SDK) — Unreal package for meta quest devices](../img/unreal_package_for_meta_quest_devices.png)

:::warning
If you see that your project opens as a "window" application inside the quest,

it is a good indication that you forgot to check this box.

:::

## Try to deploy a simple level to your headset

Try and build the project and deploy it to your headset.

## Download and extract AR 51 Unreal Plugins into the Plugins folder

Your plugins folder should look like this:

![Oculus Quest (Unreal SDK) — Unreal plugin folder quest](../img/unreal_plugin_folder_quest.png)

Restart the editor to enable the plugin.

## Create a new level

File -> New Level -> Basic

## Be sure to set the visibility of the plugins to True

In the Content Browser window. Select settings and enable "Show Plugin Content"

## Drag the AR 51 SDK into the current level

From the "Content Browser" windows, select Plugins -> AR 51 SDK Content -> Blueprints and drag "AR51SDK_Blueprint" into the level. 

## Drag the AR 51 Oculus-dependent Blueprints into the current level

From the "Content Browser" windows, select Plugins -> AR51SDK_OCULUS Content -> Blueprints and drag: "OculusQuestBoundaryAdapter_BP", "OculusQuestHandsAdapter_BP" and "VRPawn" into the level. 

## Make sure your VrPawn object uses "stage tracking"

Either create a new VRPawn object (using [these instructions](https://hub.vive.com/storage/docs/en-us/UnrealPlugin/VRPawn.html)) or edit the provided VRPawn Blueprint.

Make sure that your tracking space is set to “Stage” ![Oculus Quest (Unreal SDK) — Unreal vrpawn tracking origin set to stage](../img/unreal_vrpawn_tracking_origin_set_to_stage.png)

## In AR 51 Blueprint, select "Oculus Quest" as the platform type

From the Details panel, under “General” you should see a field "Platform". Please select "Oculus Quest"  ![Oculus Quest (Unreal SDK) — Unreal select plaform type](../img/unreal_select_plaform_type.png)

## Make sure you have enabled Meta's Hand support

In the project settings under the Meta XR plugin section choose the following: ![Oculus Quest (Unreal SDK) — Unreal enable meta hand support](../img/unreal_enable_meta_hand_support.png):

* "Hand Tracking Support"  should be "Controllers and Hands" or "Hands Only"

* "Hand Tracking Version"  works better with V2.

:::warning
## Be sure to enable "Developer runtime features" on the “Oculus PC app”

Without enabling this option you might not be able to move your hands on a tethered app and also in "VR preview" mode

:::

Open the "Oculus" PC application.

Under Settings -> Beta, enable "Developer runtime features".

![Oculus Quest (Unreal SDK) — Enable developer on quest pc app](../img/enable_developer_on_quest_pc_app.png)

## In a tethered deployment - enable "Start in VR"

Before deploying to a tethered application (PC VR app), be sure that you project is set to start in VR.

In Unreal-Engine, under "Project Settings" -> "Project Description" enable "Start in VR".

![Oculus Quest (Unreal SDK) — Unreal engine start in VR](../img/unreal_engine_start_in_VR.png)

:::warning
## Hit Play 

Make sure that AR 51's system is running on the same local network as your device.

:::

You should see the character move in realtime ![Oculus Quest (Unreal SDK) — Unreal character waving](../img/unreal_character_waving.png).

## On your first run, perform device calibration

You should now perform [device calibration](../../06-calibration/02-device-calibration.md)  so that the character would position on your body.
