This repository contains a sample Mixed Reality (MR) application built with Unity demonstrating passthrough, full 6DoF tracking, and controller input. The example is implemented and validated for Meta Quest 3 hardware and shows one way to integrate passthrough and XR input into a Unity scene.
- Passthrough integration demonstrating mixed-reality compositing
- Full 6DoF head tracking and smooth locomotion examples
- Controller input examples (button, thumbstick, and pose handling)
- Example scenes and scripts showing common MR patterns
- Targeted example implementation for Meta Quest 3
- Unity (project created with Unity 2021.3 LTS or later; newer versions should work but may require package updates)
- OpenXR enabled in Project Settings
- XR Plugin packages (OpenXR, XR Interaction Toolkit) installed via Package Manager
- Android SDK & NDK for building to Meta Quest devices
- A Meta Quest 3 device for running passthrough features and testing
-
Clone the repository:
git clone https://github.com/your-org/mr-openxr-unity-meta-passthrough-sample.git
-
Open the project in Unity Hub and let package installation complete.
-
Ensure
OpenXRis selected in Project Settings → XR Plug-in Management and required features are enabled (hand tracking, controller support, passthrough/runtime features as needed). -
Connect your Meta Quest 3 via USB (or use wireless ADB) and ensure ADB recognizes the device.
-
Build and deploy:
- On Windows, use the provided
build.ps1script to build. Run it from PowerShell in the repository root. - Alternatively, open
File → Build Settingsin Unity, set Platform to Android, and build/Run to your device.
- On Windows, use the provided
Notes:
- The repository also contains helper scripts under
Editor/such asBuildScript.csandAndroidManifestModifier.csto simplify building and manifest adjustments.
- Scenes: see the
Assets/_Shared/Scenes/folder for sample scenes demonstrating passthrough composition and controller interactions. - Scripts: key scripts live under
Assets/_Shared/Scripts/andAssets/Scripts/. Look for:PassthroughManager— controls passthrough activation and layeringXRInputHandler— maps controller inputs to app actions- Example locomotion and interaction scripts demonstrating 6DoF movement and object manipulation
- Passthrough behavior depends on the device runtime and permissions. On Meta Quest 3, passthrough APIs may require runtime consent and specific OpenXR extensions.
- Use passthrough thoughtfully and provide clear UI affordances when mixing virtual content with the real environment.
- If passthrough does not appear on device, verify OpenXR runtime and required extensions are enabled in Unity and on the headset.
- Check Unity Console for missing package or manifest errors.
- For build issues, ensure Android SDK/NDK paths are configured in Unity Preferences.
- This repository is a sample; feel free to open issues or submit PRs to improve documentation, add more examples, or broaden device support.
- See the
LICENSEfile in the project root for license details. - Built as an example MR sample demonstrating Unity + OpenXR passthrough on Meta Quest 3. Portions of the project may include third-party components; consult their respective licenses.
If you want, I can also add a short quick-start guide for building with build.ps1 and for the main example scene — tell me which you'd prefer next.