Class XRHandSubsystem
A subsystem for detecting and tracking hands and their corresponding joint pose data.
Inheritance
Implements
Inherited Members
Namespace: UnityEngine .XR.Hands
Assembly: solution.dll
Syntax
public class XRHandSubsystem : SubsystemWithProvider<XRHandSubsystem, XRHandSubsystemDescriptor, XRHandSubsystemProvider>, ISubsystem
Remarks
The XRHandSubsystem
class is the main entry point for accessing hand tracking data
provided by an XR device. A provider implementation that reads tracking data from the
user's device and provides updates to this subsystem must also be available. The XR
Hands package includes a provider implementation for OpenXR.
Get an instance for this XRHandSubsystem
from the active XR
loader, as described in Get the XRHand
For lowest latency, read the tracking data available from the leftMonoBehaviour.Update
event and once near the UnityBeforeRender
callback can negatively impact framerate.
For best results, update game logic affected by hand tracking in a
Dynamic update and perform a final update of hand visuals in a
Before
Refer to Hand tracking data for more information.
Constructors
Name | Description |
---|---|
XRHand |
Constructs a subsystem. Do not invoke directly. |
Fields
Name | Description |
---|---|
hands |
Obsolete. Use updated |
preprocess |
This is called after the subsystem retrieves joint data from the
provider, and before and IXRHand |
tracking |
A callback invoked when the subsystem begins tracking a hand's root pose and joints. |
tracking |
A callback invoked when the subsystem stops tracking a hand's root pose and joints. |
updated |
A callback invoked for each hand update. |
Properties
Name | Description |
---|---|
joints |
Indicates which joints in the XRHand |
left |
Gets the left XRHand that is being tracked by this subsystem. |
right |
Gets the right XRHand that is being tracked by this subsystem. |
update |
Describes what data on either hand was updated during the most recent hand update. |
Methods
Name | Description |
---|---|
On |
Called by Unity before the subsystem is returned from a call to |
On |
Called by Unity before the subsystem is fully destroyed during a call to |
Register |
Registers a processor for hand joint data. |
Try |
Request an update from the hand data provider. Application developers consuming hand tracking data should not call this function. |
Unregister |
Unregisters a processor for hand joint data. |