Hands Debug Overlay
Updated: Oct 22, 2026
The HandsDebugOverlay prefab displays live hand tracking, pinch, and microgesture state in a head-locked overlay. Use it for debugging Interaction SDK input in Unity XR projects. The overlay reads state from the OpenXR runtime.
Use this page to learn what the overlay shows and how to add, configure, and read it.
Note: The HandsDebugOverlay prefab is available in Interaction SDK v209 and later.
The overlay shows one panel for each hand. Each panel has a Left Hand or Right Hand title and shows Tracking lost when the hand is not tracked. While the hand is tracked, the panel shows pinch state for the Index and Middle fingers and a gesture log of the six most recent events.
Each pinch row shows a strength value from 0.00 to 1.00 and an OFF or ON state. The gesture log adds an entry when a pinch starts or ends, such as Index Pinch Start or Middle Pinch End. It also logs these microgestures: Swipe Forward, Swipe Backward, Swipe Left, Swipe Right, and Tap Thumb.
The overlay also shows a warning when a required OpenXR feature or profile is not enabled:
| Warning | Affects |
|---|
Missing feature: Meta Hand Tracking Aim | Pinch state and strength |
Missing feature: Hand Tracking Subsystem | Hand tracking and the tracking state |
Missing feature: Meta Hand Microgestures | Microgesture log entries |
Missing profile: Hand Interaction Profile | Microgesture log entries |
How the overlay is structured
The root of the HandsDebugOverlay prefab has a DebugViewOverlay component. The left and right hand canvases and the overlay material are already assigned. The material uses a transparent shader that ignores depth, so the panels draw on top of the scene.
The prefab contains two instances of the DebugHandView prefab, one for each hand. At startup, each hand view creates its Index and Middle rows from the FingerTemplate prefab. Each hand view creates its six log rows from the LogTemplate prefab.
At runtime, DebugViewOverlay moves each hand canvas to the canvas render layer and renders it to a texture. It then draws each texture on a quad that faces the main camera, 1 meter in front of the camera. The Scale, Horizontal Offset, Vertical Offset, and Opacity settings control how the quads appear.
Note:DebugViewOverlay is marked as experimental, and its API may change. The hand, gesture, and log views inside the prefab are internal. Configure the overlay through the DebugViewOverlay component in the Inspector, or through its public properties and its inject methods.
Add the overlay to a scene
Adding the overlay places left and right debug panels in front of the main camera in Play mode.
Before you add the overlay, confirm that your project meets these requirements:
- The project uses the Unity OpenXR Plugin (
com.unity.xr.openxr). The overlay scripts compile only when this package is installed. - The project uses Unity XR Hands (
com.unity.xr.hands) for hand tracking and pinch data. The latest Meta XR Core SDK already includes this dependency. - The project uses Unity OpenXR Plugin 1.17.0 or later for microgesture data.
- The OpenXR settings enable Hand Tracking Subsystem, Meta Hand Tracking Aim, and Meta Hand Microgestures as features. The OpenXR settings enable Hand Interaction Profile as an interaction profile.
- The scene has a camera tagged
MainCamera.
In the Project panel, go to Packages > Meta XR Interaction SDK Essentials > Runtime > UnityXR > Prefabs > DebugInputView.
Drag the HandsDebugOverlay prefab into the Hierarchy.
Press Play. The left and right panels appear in front of the camera in the Game view or on the device.
Enable the required OpenXR features and profile
If a panel shows a missing feature or profile warning, enable the named item and run the scene again.
Open Project Settings > XR Plug-in Management > OpenXR for each build target you play or build on.
Enable Hand Tracking Subsystem, Meta Hand Tracking Aim, and Meta Hand Microgestures as features. Enable Hand Interaction Profile as an interaction profile.
Run the scene again and confirm the warnings no longer appear.
You can change the size, position, opacity, console logging, and render layers of the overlay.
In the Hierarchy, select the HandsDebugOverlay GameObject. In the Inspector, find the DebugViewOverlay component.
Do not change the canvas and material references assigned in the prefab.
Under Configuration, adjust these settings:
| Property | Prefab Default | Range | Description |
|---|
Scale | 0.001 | 0.0001 to 0.002 | World-space scale of the panels. |
Horizontal Offset | 0.5 | 0 to 1.5 | Distance between the panels along the head’s right axis. |
Vertical Offset | 0 | -1 to 1 | Offset of the panels along the head’s up axis. |
Opacity | 0.8 | 0 to 1 | Opacity of the panels. |
Log To Console | Enabled | n/a | Writes each gesture log entry to the Unity Console. |
Scale, Horizontal Offset, Vertical Offset, and Opacity apply at runtime. The component reads them every frame, so you can change them before or during Play.
Set Log To Console before you press Play. Changes to this checkbox after startup do not apply to the gesture logs. To change it at runtime, set the LogToConsole property from a script.
Check the two render layer settings before you press Play. The component reads them only at startup:
- Overlay Render Layer (default: Default) must be a layer that the main camera draws.
- Canvas Render Layer (default: UI) must be a layer that the main camera does not draw.
If Canvas Render Layer is set to a layer the main camera draws, the camera draws the world-space canvas directly and the overlay also draws the quad on the overlay layer, so each panel appears twice.
To change the overlay from a script, set Scale, HorizontalOffset, VerticalOffset, Opacity, and LogToConsole through their public properties. The LogToConsole setter propagates to the gesture logs at runtime.
To assign references from a script, use the DebugViewOverlay inject methods. Call them before the component’s Start() method runs:
// In initialization code that runs before Start(), pass the canvases, material, and layers:
overlay.InjectAllDebugViewOverlay(leftHandCanvas, rightHandCanvas,
overlayMaterial, overlayRenderLayer, canvasRenderLayer);
To assign one reference at a time, use InjectLeftHandCanvas, InjectRightHandCanvas, InjectOverlayMaterial, InjectOverlayRenderLayer, or InjectCanvasRenderLayer.
Use the overlay to confirm tracking, pinch, and microgesture input while you test interactions.
Build and run on your device, or press Play in the editor with hand tracking active.
Hold your hands where the device can track them. Confirm that the pinch strength values change and that each finger switches between OFF and ON.
Pinch with your Index and Middle fingers. Confirm that the gesture log adds Index Pinch Start, Index Pinch End, Middle Pinch Start, and Middle Pinch End entries.
Perform microgestures and confirm that the log shows the matching swipe or tap entries.