docs.unity3d.com
    Show / Hide Table of Contents

    Class XRHandSubsystemProvider

    Methods to implement by the implementing provider for an XRHandSubsystem.

    Inheritance
    Object
    SubsystemProvider
    UnityEngine.SubsystemsImplementation.SubsystemProvider<XRHandSubsystem>
    XRHandSubsystemProvider
    Inherited Members
    UnityEngine.SubsystemsImplementation.SubsystemProvider<UnityEngine.XR.Hands.XRHandSubsystem>.TryInitialize()
    UnityEngine.SubsystemsImplementation.SubsystemProvider<UnityEngine.XR.Hands.XRHandSubsystem>.Start()
    UnityEngine.SubsystemsImplementation.SubsystemProvider<UnityEngine.XR.Hands.XRHandSubsystem>.Stop()
    UnityEngine.SubsystemsImplementation.SubsystemProvider<UnityEngine.XR.Hands.XRHandSubsystem>.Destroy()
    UnityEngine.SubsystemsImplementation.SubsystemProvider.running
    Namespace: UnityEngine.XR.Hands.ProviderImplementation
    Syntax
    public abstract class XRHandSubsystemProvider : SubsystemProvider<XRHandSubsystem>

    Methods

    GetHandLayout(NativeArray<Boolean>)

    Gets the layout of hand joints for this provider, by having the provider mark each index corresponding to a XRHandJointID get marked as true if the provider attempts to track that joint.

    Declaration
    public abstract void GetHandLayout(NativeArray<bool> handJointsInLayout)
    Parameters
    Type Name Description
    NativeArray<Boolean> handJointsInLayout

    Each index corresponds to a XRHandJointID. For each joint that the provider will attempt to track, mark that spot as true by calling .ToIndex() on that ID.

    Remarks

    Called once on creation so that before the subsystem is even started, so the user can immediately create a valid hierarchical structure as soon as they get a reference to the subsystem without even needing to start it.

    TryUpdateHands(XRHandSubsystem.UpdateType, ref Pose, NativeArray<XRHandJoint>, ref Pose, NativeArray<XRHandJoint>)

    Attempts to retrieve current hand-tracking data from the provider.

    Declaration
    public abstract XRHandSubsystem.UpdateSuccessFlags TryUpdateHands(XRHandSubsystem.UpdateType updateType, ref Pose leftHandRootPose, NativeArray<XRHandJoint> leftHandJoints, ref Pose rightHandRootPose, NativeArray<XRHandJoint> rightHandJoints)
    Parameters
    Type Name Description
    XRHandSubsystem.UpdateType updateType

    Informs the provider which kind of timing the update is being requested under.

    Pose leftHandRootPose

    Update this and include XRHandSubsystem.UpdateSuccesFlags.LeftHandRootPose in the return value to update the left hand's root pose.

    NativeArray<XRHandJoint> leftHandJoints

    Array of hand joints to fill out for the left hand. These are initialized with a copy of the current joint data for the left hand, so if the last known tracking data for a particular joint is still fine, you don't need to fill out that data again. If you update these, include XRHandSubsystem.UpdateSuccesFlags.LeftHandJoints in the return value to have the changes reflected in the subsystem.

    Pose rightHandRootPose

    Update this and include XRHandSubsystem.UpdateSuccesFlags.RightHandRootPose in the return value to update the right hand's root pose.

    NativeArray<XRHandJoint> rightHandJoints

    Array of hand joints to fill out for the right hand. These are initialized with a copy of the current joint data for the right hand, so if the last known tracking data for a particular joint is still fine, you don't need to fill out that data again. If you update these, include XRHandSubsystem.UpdateSuccesFlags.RightHandJoints in the return value to have the changes reflected in the subsystem.

    Returns
    Type Description
    XRHandSubsystem.UpdateSuccessFlags

    Returns XRHandSubsystem.UpdateSuccessFlags to describe which tracking data was successfully updated.

    In This Article
    • Methods
      • GetHandLayout(NativeArray<Boolean>)
      • TryUpdateHands(XRHandSubsystem.UpdateType, ref Pose, NativeArray<XRHandJoint>, ref Pose, NativeArray<XRHandJoint>)
    Back to top
    Terms of use
    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