Microtube Docs
EN中文
Developers / Unreal / Project setup

Unreal project setup

Install the HexR plugin, check your project and set it up for Meta Quest.

Preview

The HexR plugin for Unreal is at 0.2.0, a preview: its API may still change. On a Meta Quest 3 with real gloves, the gloves connect over Bluetooth and the haptics play. On a PICO 4 the app runs in passthrough; gloves there, and on Windows, have not been tried yet.

What you need

RequirementDetails
Unreal Engine 5.8Built and tested on 5.8.4. Install it with Android support: in the Epic Games Launcher, open the engine’s Options and tick Android.
Android build toolsThe Android SDK, NDK and JDK that Unreal 5.8 asks for. Epic’s Android setup guide ↗ walks through them.
No compilerThe plugin comes with prebuilt binaries for Windows and Android, so a Blueprint-only project needs no Visual Studio. You only need it to call HexR from your own C++.
OpenXRUnreal’s own OpenXR and OpenXRHandTracking plugins. No Meta or PICO plugin is needed.
A headsetA Meta Quest 3, 3S, 2 or Pro in developer mode. For PICO 4 and 4 Ultra, see PICO setup too.

Rather start from a working project? The tutorial project is already set up.

Install the plugin

  1. Get the plugin zip

    Download HexR-0.2.0-UE5.8.zip from HexR-Unreal (private preview: ask us for access).

  2. Unzip it into your project

    Unzip it into your project’s Plugins folder. Create the folder if there is none. You should end up with YourProject/Plugins/HexR/HexR.uplugin.

  3. Open the project

    Unreal turns the plugin on by itself. You now have a Tools → HexR menu, a Tools → HexR Tools tab and a Project Settings → Plugins → HexR page.

  4. Validate the project

    Choose Tools → HexR → Validate Project... and fix what it lists (below).

To call HexR from your own C++, add its modules to your game module’s Build.cs:

csharp
// YourGame.Build.cs: only needed to call HexR from C++. Blueprint needs nothing.
PublicDependencyModuleNames.AddRange(new string[] { "HexR", "HexRCore" });
// Add "HexRPassthrough" to switch passthrough from C++, and "HexRRemote" for HexR Remote commands.

Update or remove the plugin

Validate the project

Tools → HexR → Validate Project... opens the HexR Tools tab at its project checklist. A row is green when it is right. Otherwise it has a button that sets it for you: Enable for a plugin, Fix for a setting. Fix all does every row at once. Some fixes need an editor restart, and the row says so.

The PROJECT SETUP checklist in the HexR Tools tab, every row green
The project checklist in HexR Tools. Each row that is not green has a button that fixes it.

It checks:

On a build machine, run the same checks without the editor window: UnrealEditor-Cmd YourProject.uproject -run=HexRValidate. It lists them and exits with code 1 if anything needs fixing. Add -Fix to apply every fix first.

Set up Meta Quest

  1. Let Validate Project set up Android

    It sets everything Quest needs. To check by hand, open Project Settings → Platforms → Android. Package for Meta Quest devices, Support arm64 and Support Vulkan are on. Support x86_64 and Support OpenGL ES3.2 are off. Minimum SDK Version is 32, or 29 if the app should also install on a PICO 4 (see PICO setup).

  2. Turn on hand tracking on the headset

    On the Quest, open Settings → Movement tracking and turn on hand tracking. OpenXR starts on the headset by itself, so there is nothing to switch on in Unreal.

  3. Leave the permissions to HEXR

    When you package, the hand-tracking and Bluetooth permissions go into the Android manifest for you. The app asks for Nearby devices the first time a glove connects: see Allow Bluetooth on the headset.

Using PICO as well? The same APK runs on both: see PICO setup. Which headsets have been tried: Platform & headset support.

Windows and the editor

On Windows 10 or 11 (64-bit), the editor connects to a glove itself, through Tools → HexR Tools, using Windows’ own Bluetooth. Windows builds connect the same way. On macOS and Linux the plugin has no Bluetooth yet: tick Force Simulated (below) to work with simulated gloves.

Project settings

Project Settings → Plugins → HexR, in the groups the page shows:

GroupSettingWhat it does
BluetoothForce SimulatedUse simulated gloves instead of Bluetooth, for working without a glove
BluetoothSimulated GlovesWith Force Simulated on, offer a simulated left and right glove. Untick it to see what happens when no glove answers
BluetoothVerbose BluetoothLog each connection step
BluetoothConnect Gloves on StartConnect both gloves when the game starts, whatever the pawn. Off by default
BluetoothRelease when PausedRelease every channel when the app pauses, for example when the headset comes off. On by default
InteractionAuto Haptics for Template GrabsVR Template grabs press the hand that holds them (see Haptics setup). On by default
Hand TrackingCurl MeasureHow finger curl is measured. It is what lets a HexR Grabbable go when the hand opens. Bone Ratio, the default, needs no calibration; the four ratios under it tune it
Unreal HapticsHaptic Effect ModeWhat Unreal’s controller haptics do on the gloves: Vibration (default), Pressure or Off (see Haptics setup)
Unreal HapticsHaptic Effect FingersWhich channels they use. All six by default
Unreal HapticsForce Feedback to GlovesGamepad rumble drives the gloves too. Off by default
Floating MenuMenu ScenesThe levels the HexR menu lists
PassthroughPassthroughShow the wearer’s room behind the app (below). Off by default; needs an editor restart
PICOPackage for PICOAdd what PICO needs to the APK, so it runs on PICO too (see PICO setup). On by default; Quest ignores it

HexR Remote, for the HexR Companion phone app, has its own settings page, Project Settings → Plugins → HexR Remote. It is off by default: see HexR Remote.

Passthrough on Meta Quest

Passthrough shows the wearer’s room behind your app. The plugin uses Unreal’s own OpenXR for it, so no Meta plugin is needed.

  1. Turn it on

    Tick Passthrough in Project Settings → Plugins → HexR → Passthrough, then restart the editor. When you package, the plugin declares passthrough in the Android manifest.

  2. Run Validate Project

    Passthrough needs Mobile Alpha Output (Project Settings → Engine → Rendering → Mobile). Set it with Validate Project’s Fix, not the checkbox. Unreal’s Android packaging reads the checkbox’s value as off, and the room then doesn’t show.

  3. Hide your VR scenery

    Anything opaque still covers the room. Add a HexR Passthrough Visibility component to a sky, a floor or walls. It hides them, with their collision and sound, while the room shows, so the same level still works on a monitor.

Check it

Switch a glove on and close the HexR Companion app: a glove connects to one device at a time. Don’t pair the glove in Windows’ Bluetooth settings. Then open Tools → HexR Tools:

  1. Connect

    Press Connect on the Left glove or Right glove card.

  2. Send a press

    Pick a hand and a channel, set the haptic, and press Trigger IN. All OFF releases everything.

The HexR Tools tab: the Left glove and Right glove cards with Connect buttons, and the channel picker
HexR Tools: connect a glove, then send it a press or a vibration.

Tick Preview only (don't send) to see the C++ call it would make without sending it. The console does the same, in the editor or on the headset:

text
HexR.Status          prints Bluetooth's and both gloves' state to the log
HexR.Connect Left    connects the left glove (or cancels a connect, or disconnects)
HexR.Connect Right
HexR.Menu            shows or hides the HexR menu (HexR.Menu Show, HexR.Menu Hide)
Windows with real gloves

The Bluetooth scan has been checked on Windows, but a full session with real gloves hasn’t been run there yet. If something goes wrong, tell us.

Next

Give your pawn hands and connect the gloves: Pawn & hands setup.