UE5.3 & Android VR Nightmare

Since I have just spent three hours researching this, I am sharing my extensive notes about the list of steps required for deploying to a Meta Quest 3 from within UE5.2. Now if you read this a year from now, chances are good that the list of steps required may have changed. Always refer to the the official Unreal and Meta guides in case of need.

Also, as of today, 11 November 2023, this guide WILL not work in UE5.3. simply because the MetaXR plugin has not yet been updated to UE5.3.

Deploying to Quest - Workflow UE5.2 to Quest 3

  1. Have the headset connected to the PC via USB-C cable.
  • Enable developer mode on the Headset (can be done from the headset or the mobile app, and from Meta Quest Dev Hub*), this should enable USB debug mode. Make sure you have “allowed connection” from inside the headset. If this step does not appear, then something is not correct.
    -Download Oculus PC desktop app (if not already installed)
  1. Follow the Unreal documentation to install the proper Version of the Android SDK and NDK (in 2023 for UE5.2, this Android Studio 4.0 as of May 28,2020), How to Set Up Android SDK and NDK For Your Unreal Engine Development Environment | Unreal Engine 5.2 Documentation

a. Particluarly, SDK, NDK, JDK. Make sure to use the SDK version that UE supports (it may not be the latest version!)
b. After having installed and configured, Android studio, run SetupAndroid from Engine/Extras as Administrator.
c. The install directory for NDK should be C:/Users/[Username]/AppData/Local/Android/SDK/ndk/, where “username” is your login name for your computer.

  1. Verify if the Quest headset can be reached via ADB:
    a. Open up windows command propt (Windows+R), CMD, type “adb devices”. Your headset’s ID should appear if connected.
  2. Allow USB Debugging from inside the headset (a window will pop up).
  3. Not techincally required but could be beneficial:
    a. Having a Meta dev organisation https://developer.oculus.com/manage/organizations/1415855195443090/
    b. Download & install the Meta Quest Dev Hub (earlier, ODH) and configure it. This is quite a useful app to have but be cautious!
    a. You may have to set ADB and NDK paths manually as they may interfere with what you set up under Pt2.
    b. You may need the Oculus ADB drivers (not sure)
    c. You may need to set up the device with MQDH, which may require a WiFi
    In my main dev workstation I ended up not installing MQDH and could still compile for and deploy to the Quest 3

Unreal

  1. Device should be visible from Platforms/Devices in Unreal
  2. Under Platforms, Android should not have any exclamation marks
  3. Enable MetaXR Plugin under Plugins
  4. Make Project settings following the Meta guide Not Found | Oculus
  5. Most importantly: Configure under Platforms/Android, hit “configure for project”
  • Set the following settings depending on your target device, Minimum SDK Version: 32. . Target SDK Version: 32. Enable FullScreen Immersive on KitKat and above devices and check for True. Disable Support OpenGL ES3.2 in Build.
  1. Add support to the headsets used under “Advanced APKPackaging” and Plugins/MetaXR
  2. Rendering configurations

Should now be ready to deploy to Quest 3 from inside UE5.2

2 Likes

My game works as long as the Meta XR plug in is off (the game opens in a 2d screen in the headset). Once Meta XR plugin is turned on then I get “App Not Responding” error. I am on 5.2.1

I’m 3 days into trying to set up 5.3 and it’s starting to get a little tiresome. Late last night I got the most beautiful green check mark I have ever seen as the apk packaged correctly. Went to deploy to my Quest 2 and … a something in the r25b ndk has caused the process to download the android-33 sdk and package for that instead of sdk 32 :smiling_face_with_tear:

No jokes I have now twice deleted sdk v33 using android studio. Checked none of my settings refer to 33. Packaged … and poof, sdk v33 reappears in android studio.

I am open to suggestions, prayers, and condolences.

Edit:

I am not the sharpest knife in the drawer.

After taking a break I took a fresh look and realised that in all of my fiddling around trying to get setup, I had changed the default setting for “Project Settings>>Android>>Project SDK Override” from blank, which defaults to the sdk and ndk specified higher up on the page, to ‘latest’ which was overriding the above and forcing the sdk v33 install. Set it back to default and it packaged first time. I have loaded it onto a quest 2 and it is working (if not very smoothly). I will test the MetaXR plugin now and I will test it all on a Quest 3 tomorrow.

For anyone wondering:
UE 5.3
Android Studio 4.0 although according to Unreal docs Android Studio Flamingo | 2022.2.1 Patch 2 May 24, 2023 should also work
sdk build tools 30.0.3
sdk 30
ndk 25.1.8937393
jdk-11

min sdk 30
target sdk 32

I also installed Visual Studio Community and made sure to check Windows 10 SDK and Unreal Game Development. I’m not sure if this step is necessary or coincidence.

I think that’s everything but I can’t guarantee I’ve remembered it all because the last 2 days have been an adventure

1 Like

@Allenheathx Just a shot in the dark here but under the MetaXR plugin there is a dropdown that says something like ‘use MetaXR’ or ‘use OpenXR with MetaXR’ extensions. (sorry I don’t have the plugin enabled right now to check exact wording). Apparently this is best set to ‘OpenXR with MetaXR extensions’

I’m deleting my comment : This guy figured it out. Quest 3 SDK/NDK/JDK for UE4&UE5 | Community tutorial

Looks like he’s right that there’s a bug in 5.3.x and it’s worth using 5.2 for the time being.

I can confirm that I have 5.3.2 working on both Quest 2 and Quest 3 with the MetaXR plugin enabled. I can package, install, and run on both devices successfully. I will try and stay on top of replying to this thread for the next little while if anyone needs help.

I have never been able to run anything with MetaXR plugin. It just crashes engine. I was also unable to build an Android app in 5.3 but after disabling most of the unused plugins building started with no errors.

I used to have similar problems, eventually I got it working. One of the videos (I think) helped was this one: Best setting for Oculus Quest Unreal Engine (youtube.com) . Try that guys settings tick box by tick box. Unreal 5 is INSANELY particular about android settings and render settings for it to work properly.

Also, quick launch from the editor usually doesn’t work for me (I get black screen without launch) but packaging out shipping builds, uploading to a release channel and installing from meta quest account does work. That is only possible if your game is already accepted on meta app store/app lab though.

Quick Launch always worked in UE 4.27. It’s hit and miss in UE5. Since shipping builds work I just do that now all the time.

Hi ! I spend almost 2 weeks on a setup of a custom level to package in APK for the Metaquest 3… I Finally manage to make it work but couldn’t get the best visual result (light, shadows and LOD look ugly…) but it works !

Following this setup: Unreal Engine 5.3.2 for Meta Quest VR | Community tutorial

I follow exactly the setup except for android studio just got the latest version because I couldn’t find the past ones. I manage to build the level with the Platform/Android/Package Project and then also manage to enable both options from the Meta XR plugins to cook on the fly and deploy directly to the device. With this, no lag from the connection between the headset and the computer, but poor performance if your level isn’t extremely optimize…

I still have trouble finding good info son optimization or settings for VR, but I think normal game optimization and light setup to have maximum performance should work. Still working on it, if you have any good tutorial please leave a link !