Develop

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.

What the overlay shows

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:
WarningAffects
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
Left Hand and Right Hand overlay panels showing pinch state, pinch strength, and gesture 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.
  1. 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.
    For Unity XR project setup, see Use Interaction SDK with Unity XR.
  2. In the Project panel, go to Packages > Meta XR Interaction SDK Essentials > Runtime > UnityXR > Prefabs > DebugInputView.
    Project panel showing the HandsDebugOverlay prefab in the DebugInputView folder
  3. Drag the HandsDebugOverlay prefab into the Hierarchy.
    Hierarchy showing the HandsDebugOverlay GameObject with its DebugHandViewRight and DebugHandViewLeft children
  4. 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.
  1. Open Project Settings > XR Plug-in Management > OpenXR for each build target you play or build on.
  2. Enable Hand Tracking Subsystem, Meta Hand Tracking Aim, and Meta Hand Microgestures as features. Enable Hand Interaction Profile as an interaction profile.
    OpenXR features list with Hand Tracking Subsystem, Meta Hand Microgestures, and Meta Hand Tracking Aim enabled
  3. Run the scene again and confirm the warnings no longer appear.

Configure the overlay

You can change the size, position, opacity, console logging, and render layers of the overlay.
  1. In the Hierarchy, select the HandsDebugOverlay GameObject. In the Inspector, find the DebugViewOverlay component.
    DebugViewOverlay Configuration settings for Scale, Horizontal Offset, Vertical Offset, Opacity, and Log To Console
  2. Do not change the canvas and material references assigned in the prefab.
  3. Under Configuration, adjust these settings:
    PropertyPrefab DefaultRangeDescription
    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.
  4. 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.
  5. 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.

Read the overlay

Use the overlay to confirm tracking, pinch, and microgesture input while you test interactions.
  1. Build and run on your device, or press Play in the editor with hand tracking active.
  2. 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.
  3. 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.
    Overlay panels with gesture log entries for pinch starts, pinch ends, swipes, and a thumb tap
  4. Perform microgestures and confirm that the log shows the matching swipe or tap entries.
  5. If a panel shows a warning, enable the named feature or profile in the OpenXR settings for your target platform, as described in Enable the required OpenXR features and profile. Then run the scene again.

Learn more