Class XRHandSubsystemProvider
Methods to implement by the implementing provider for an XRHand
Inherited Members
Namespace: UnityEngine .XR.Hands.ProviderImplementation
Assembly: Unity.XR.Hands.dll
Syntax
public abstract class XRHandSubsystemProvider : SubsystemProvider<XRHandSubsystem>
Methods
GetFingerShapeConfiguration(XRHandFingerID)
Gets the XRFinger
Declaration
public virtual XRFingerShapeConfiguration GetFingerShapeConfiguration(XRHandFingerID fingerID)
Parameters
Type | Name | Description |
---|---|---|
XRHand |
fingerID | Which finger to get the XRFinger |
Returns
Type | Description |
---|---|
XRFinger |
A populated XRFinger |
Remarks
Called once for each finger on creation so that the subsystem will
always have valid configurations to base detection math off of. If
the provider does not override this, defaults will be reported -
this means that if the device is more constrained in reporting joint
data than the defaults, gestures and poses may not be detected correctly.
Called after Get
Exceptions
Type | Condition |
---|---|
Argument |
Will throw an exception if |
GetHandLayout(NativeArray<bool>)
Gets the layout of hand joints for this provider, by having the
provider mark each index corresponding to a XRHand
Declaration
public abstract void GetHandLayout(NativeArray<bool> handJointsInLayout)
Parameters
Type | Name | Description |
---|---|---|
Native |
handJointsInLayout | Each index corresponds to a XRHand |
Remarks
Called once on creation so that before the subsystem is even started,
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. This is called before any call to
Get
TryUpdateHands(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 |
---|---|---|
XRHand |
updateType | Informs the provider which kind of timing the update is being requested under. |
Pose | leftHandRootPose | Update this and include |
Native |
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 |
Pose | rightHandRootPose | Update this and include |
Native |
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 |
Returns
Type | Description |
---|---|
XRHand |
Returns XRHand |