Vlog episode 1: Hand Tracking in Meta Quest using Unity
Passthrough · Hand Tracking · Build & Run · Asset Import — with best practices
Watch the Walkthrough
Objective
Prepare a Unity 6 project for Meta Quest 3 using OpenXR (not the legacy Oculus provider), install Meta XR SDK building blocks, enable passthrough and hand tracking, build & run on-device, and import an Asset Store model. Steps include additional best practices not explicitly stated in the original transcript.
Prerequisites
- Unity Editor: Install Unity 6000.2.8 (or newer 6000.2.x) with Android Build Support via Unity Hub:
- Add modules: Android SDK & NDK Tools, OpenJDK.
- Quest Developer Mode: On the headset, enable Developer Mode (Meta Quest app on phone → Devices → your headset → Developer Mode).
- USB Debugging: In the headset, enable USB debugging when prompted (allow computer). Keep the link cable connected during Build & Run.
- ADB (optional): Ensure
adbis available (Unity installs a local copy). Verify with:adb devices
Create the Unity Project
- Template: In Unity Hub, create a new project using Universal 3D (URP) Core or 3D (URP).
- Version Control (recommended): Initialize a Git repo. Add a Unity
.gitignore(see Sharing).
Switch Platform to Android
- Open File → Build Settings, select Android, click Switch Platform. Wait for conversion.
- Add your current scene to the Scenes in Build list.
Enable OpenXR and Meta Quest Features
- XR Plug-in Management: Go to Edit → Project Settings → XR Plug-in Management.
- Android tab: Enable OpenXR.
- Project Validation: Click Project Validation → Fix All until no issues remain.
- OpenXR Features (Android): In Project Settings → XR Plug-in Management → OpenXR (Android):
- Enable Meta Quest Support.
- Enable Hand Tracking Subsystem (and Meta Hand Tracking Aim if present).
- Under Interaction Profiles, ensure:
- Meta Quest Touch Plus Controller Profile (Quest 3).
- Keep any required default profiles Unity auto-adds (e.g., Oculus Touch) if validation insists.
- Desktop (optional): On the Desktop tab, also use OpenXR for consistency.
Install XR (Building Blocks)
- Open Window → Package Manager.
- Click + → Add package by name and enter:
com.meta.xr.sdk.all - Install the components you need. (The All-in-One pulls in Meta XR packages.)
- Install XR Hands for hand tracking. In the right panel under Samples, import HandVisualizer.
- Accept prompts (e.g., OVRPlugin update). Restart the Editor if requested.
- Run the Meta Project Setup tool (Meta → Tools → Project Setup or similar) and click Fix/Apply All until no issues remain.
Scene Setup: Passthrough & Hand Tracking
- Open your Sample Scene. Optionally remove the default Main Camera and any global volume if you will use Meta or XR camera rigs.
- From the Meta XR SDK Building Blocks:
- Add a camera rig suitable for OpenXR (e.g., OVRCameraRig from Meta Core or an XR Origin with XR Interaction Toolkit).
- Add a Passthrough prefab or enable passthrough via the provided components.
- Add hand-tracking prefabs (e.g., OVRHandPrefab under Left/Right Hand anchors) or configure XR Hands (Unity’s XR Hands package) with visualization.
- OVR Manager (if using Meta rig): In the rig’s root object, set Hand Tracking Support to Controllers and Hands (or Hands Only).
- To create an XR Origin: right‑click in the Hierarchy → XR → XR Origin.
- Import the Hand Visualizer: Assets → Samples → XR Hands → <version> → HandVisualizer. Drag HandVisualizer.prefab into the Hierarchy and parent it under XR Origin (VR) → Camera Offset.
- Save the scene.
Build & Run on Quest
- Connect the headset (USB). Confirm
adb deviceslists it. - File → Build Settings:
- Platform: Android.
- Development Build (optional for logs).
- Click Build And Run.
- If the app does not auto‑launch, open it on the headset under Apps → Unknown Sources.
- Headset Settings: Ensure Hand & Body Tracking is ON. Put controllers down to auto‑switch to hands.
Troubleshooting (Hands/Passthrough Not Visible)
- Validation: Re‑run Project Validation and Meta Project Setup. Fix remaining issues.
- Profiles: Confirm Meta Quest Touch Plus Controller Profile is enabled (Quest 3).
- Subsystems: Confirm Hand Tracking Subsystem (and Meta Hand Tracking Aim) are checked under OpenXR (Android) features.
- Rig: If using Meta rig, ensure OVR Manager → Hand Tracking Support = Controllers and Hands. Attach hand prefabs to hand anchors.
- Headset: Hand & body tracking must be ON in system settings. Place controllers down to switch to hands.
- Logs: Use
adb logcatto inspect runtime issues.
Importing an Asset Store Model
- Sign in: Window → Asset Store or Unity Hub/Browser → My Assets.
- Import: From Window → Package Manager → My Assets, select your model (e.g., “Humanoid”), click Download/Import.
- Project Organization: Move imported content into project folders (e.g.,
Assets/Models/YourHumanoid/). - Scene Use: Drag the model/prefab into the scene. Save.
Version Pinning (Reproducibility)
- In Package Manager, toggle from Latest to a specific version for critical packages to keep multiple apps consistent.
- For Meta XR, you can pin to a specific release instead of latest (e.g., v78) by specifying the version when adding by name.
Optional: Casting for Demos
- Use the Meta casting UI (or a desktop receiver) to mirror the headset view while testing your build.
Quick Reference (Menus & IDs)
- XR Plug‑in Management: Edit → Project Settings → XR Plug‑in Management.
- OpenXR (Android) features: Project Settings → XR Plug‑in Management → OpenXR (Android).
- Meta XR All‑in‑One SDK (Package ID):
com.meta.xr.sdk.all - Build Settings: File → Build Settings → Android → Build And Run.
- ADB launch (fallback):
adb install -r path/to/YourApp.apk adb logcat | findstr Unity // Windows quick filter