MetaXR Plugin - Won't Build Properly on Android

Hi everyone. I wonder if anyone can help me. I have had the following problem for about 5 weeks or so. Apologies in advanced for the long post, I just want to make sure I have provided all of my current situation, in hopes someone can provide a fix.

I am trying to create a project in Virtual Reality (VR), I am deploying to the Meta Quest 2 headset. I am using engine version 5.2.0 (which is supported by the plugin), and I have installed the latest version of the MetaXR plugin (directly from Meta’s website). And I have setup Android for packaging along with custom render settings.

What I am trying to achieve is setting up a feature to switch between the controllers and hand-tracking. The controller element works fine, but the hand-tracking does not appear at all. I have enabled ‘Controllers and Hands’ in the plugins settings, and it is aware I am using the Quest 2 headset. I am also working in the VR Template that Unreal provides when you go to start a new project.

However, when I go to package my level to test, I get this warning:

Output Text: ‘Warning: Unable to retrieve OculusXRHMD, cannot add event delegates.’

The .apk does complete the process of packaging, however because of this warning, the .apk’s file size is very small, and when I upload the .apk via SideQuest, the screen just appears black.

If I remove the VR functionality and build with a Gamepad for instance, the project builds as it should.

I have tried the following:

  • Renaming elements of the plugin to ‘Meta’ rather than ‘Oculus’.
  • Disabling OpenXR, and just having the plugin enabled.
  • Watched tutorials on both setting up hand-tracking withing UE5, and making sure I have installed the plugin correctly.
  • Making my own Enhanced Input Actions and Player Mappable Input Config to just target the ‘Oculus Hand’ components within the plugin.
  • Viewed and implemented a lot of the processes Meta suggests in their documentation.

Here is a breakdown of my custom pawn:

  1. I make a new Pawn Blueprint Class.

  2. I add in a Camera.

  3. I add a Motion Controller Component, which I call ‘MCLeftHand’ and I make sure it is targeting the left controller.

  4. I duplicate my Motion Controller Component, and I call this one ‘MCRightHand’ and I make sure it is targeting the right controller.

  5. I then click on my ‘MCLeftHand’ and add an Oculus XR Hand Component and name it ‘LeftHand’. In the ‘Skeleton Type’ and ‘Mesh Type’ variables I then assign ‘Hand Left’.

  6. Next, I duplicate my Oculus XR Hand Component and name it ‘RightHand’. Then, in the ‘Skeleton Type’ and ‘Mesh Type’ variables I then assign ‘Hand Right’. I then drag this component onto my ‘MCRightHand’.

  7. I then click on my ‘LeftHand’ and add a Cube and name it ‘LeftHandCube’. I then scale it on the X,Y and Z to 0.1.

  8. I then click on my ‘RightHand’ and add a Cube and name it ‘RightHandCube’. I then scale it on the X,Y and Z to 0.1.

Here is a screenshot of what the hierarchy looks like:
MetaHandsPawn Hierarchy

I then compile and save the pawn, and then in the gamemode that is pre-created named ‘VRGameMode’ I change the Default Pawn Class from ‘VRPawn’ to the one I have just created.

There is No component, specifically for the headset. I have tried to add in other components the plugin offers to try and get the project to register the headset component.

I have tried so many things to get this basic functionality to run and I am not sure what I am doing wrong to get it to function correctly. Any suggestions would be great!

If you need any more information, just add it to your reply and I will get back as soon as possible. Thank you very much all!

1 Like

I’m sorry to hear about your issue, did you ever find a solution? I’m actually dealing with this myself right now lol

1 Like

also having the same problem… anyone figure this out?

Have you ever figured out this problem?