docs.unity3d.com
    Show / Hide Table of Contents

    Class HandTracking

    This enables the use of hand-tracking data in OpenXR through the XRHandSubsystem. It enables XR_EXT_hand_tracking in the underlying runtime. To retrieve hand data, use the XRHandSubsystem retrieved from subsystem.

    Inheritance
    Object
    HandTracking
    Namespace: UnityEngine.XR.Hands.OpenXR
    Syntax
    public class HandTracking : OpenXRFeature
    Remarks

    For this extension to be available, you must install the XR Hands package.

    Fields

    extensionString

    The OpenXR Extension string. OpenXR uses this to check if this extension is available or enabled. See hand interaction extension documentation for more information on this OpenXR extension.

    Declaration
    public const string extensionString = "XR_EXT_hand_tracking"
    Field Value
    Type Description
    String

    featureId

    The feature ID string. This is used to give the feature a well known ID for reference.

    Declaration
    public const string featureId = "com.unity.openxr.feature.input.handtracking"
    Field Value
    Type Description
    String

    Properties

    subsystem

    The XRHandSubsystem that retrieves hand data from its provider. Will only be valid when this feature is enabled and running. To subscribe to updates, use handsUpdated.

    Declaration
    public static XRHandSubsystem subsystem { get; }
    Property Value
    Type Description
    XRHandSubsystem

    Methods

    HookGetInstanceProcAddr(IntPtr)

    Declaration
    protected override IntPtr HookGetInstanceProcAddr(IntPtr func)
    Parameters
    Type Name Description
    IntPtr func
    Returns
    Type Description
    IntPtr

    OnAppSpaceChange(UInt64)

    See .

    Declaration
    protected override void OnAppSpaceChange(ulong xrSpace)
    Parameters
    Type Name Description
    UInt64 xrSpace

    OnInstanceCreate(UInt64)

    See .

    Declaration
    protected override bool OnInstanceCreate(ulong xrInstance)
    Parameters
    Type Name Description
    UInt64 xrInstance
    Returns
    Type Description
    Boolean

    OnSessionCreate(UInt64)

    Called after xrCreateSession.

    Declaration
    protected override void OnSessionCreate(ulong xrSession)
    Parameters
    Type Name Description
    UInt64 xrSession
    Remarks

    Creates an XRHandSubsystem with the OpenXR provider.

    OnSubsystemDestroy()

    Called before the OpenXR loader destroys its subsystems.

    Declaration
    protected override void OnSubsystemDestroy()
    Remarks

    Destroys the XRHandSubsystem.

    OnSubsystemStart()

    Called after the OpenXR loader has started its subsystems.

    Declaration
    protected override void OnSubsystemStart()
    Remarks

    Starts the XRHandSubsystem and automatic updating for it. To subscribe to updates, use handsUpdated.

    OnSubsystemStop()

    Called before the OpenXR loader stops its subsystems.

    Declaration
    protected override void OnSubsystemStop()
    Remarks

    Stops the XRHandSubsystem and automatic updating for it.

    OnSystemChange(UInt64)

    See .

    Declaration
    protected override void OnSystemChange(ulong xrSystem)
    Parameters
    Type Name Description
    UInt64 xrSystem
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023