Quickly Build a MetaXR Interaction Lab in Unity
This guide walks through setting up Meta XR SDK in Unity, using Building Blocks to add camera rigs, hand tracking and passthrough, binding interaction events, accessing hand‑tracking data via OVRSkeleton/OVRHand, and integrating ONNX machine‑learning models for XR experiments.
When first receiving a Quest headset, developers often wonder how to access 6DoF pose, tracking data, and mixed‑reality features in Unity. The default Unity MR/VR templates are complex, and many tutorials are outdated.
Meta addresses this by providing the Building Blocks plugin (Meta XR SDK) that adds ready‑made interaction modules, automatically installs dependencies, and configures required project settings.
Step‑by‑step setup
Open Package Manager and install Oculus XR Plugin and Meta XR All‑in‑One SDK (which includes Core and Interaction modules).
Restart the project, then run Meta XR Tools → Project Setup Tools and apply the suggested fixes.
In Meta XR Tools → Building Blocks , add Camera Rig , Passthrough and Hand Tracking to the scene.
Connect the Quest via USB 3, launch Meta Quest Link , open the Quest Link UI, and press the Run button to view the MR scene in the headset.
Interaction components
The SDK provides prefabricated interaction objects such as virtual buttons, grab‑able objects, and teleportation. For example, adding a Poke Interaction creates a pressable white square. To make it functional, add a Pointable Unity Event Wrapper component, drag the Poke Interactable script into the Pointable field, and bind the desired Unity events (e.g., select, trigger).
Accessing hand‑tracking data
To retrieve 6DoF hand‑joint data, define OVRSkeleton and OVRHand in a script. Then locate the [BuildingBlock] Hand Tracking component under the Camera Rig in the Hierarchy and bind it in the Inspector. The script can read joint positions, such as the tip of the right index finger.
Integrating machine‑learning models
For researchers who want to run inference in XR, the guide shows how to export a model to ONNX, install the OnnxRuntime package via the .NET CLI, and load the model in Unity. It demonstrates constructing a DenseTensor with a data array and tensor dimensions, calling Run() to obtain inference results, and locating the model file in the project's Assets folder.
References to the official Meta XR SDK documentation, Meta Quest Link, and ONNX/OnnxRuntime resources are provided for further exploration.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Network Intelligence Research Center (NIRC)
NIRC is based on the National Key Laboratory of Network and Switching Technology at Beijing University of Posts and Telecommunications. It has built a technology matrix across four AI domains—intelligent cloud networking, natural language processing, computer vision, and machine learning systems—dedicated to solving real‑world problems, creating top‑tier systems, publishing high‑impact papers, and contributing significantly to the rapid advancement of China's network technology.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
