Class VisionOSHandExtensions
Defines extension methods for platform-specific hand data.
Inherited Members
Namespace: UnityEngine .XR.VisionOS
Assembly: Unity.XR.VisionOS.dll
Syntax
public static class VisionOSHandExtensions
Methods
FromIndex(int)
Call this to get the corresponding Vision
Declaration
public static VisionOSHandJointID FromIndex(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index | Index to convert to an ID. |
Returns
Type | Description |
---|---|
Vision |
The ID matching the index passed in. |
GetVisionOSJoint(XRHand, VisionOSHandJointID)
Retrieves a visionOS-specific hand joint by its ID.
Declaration
public static XRHandJoint GetVisionOSJoint(this XRHand hand, VisionOSHandJointID jointID)
Parameters
Type | Name | Description |
---|---|---|
XRHand | hand | The hand this extension method extends. To call this extension
method, write it like
|
Vision |
jointID | ID of the required joint. |
Returns
Type | Description |
---|---|
XRHand |
The |
ToIndex(VisionOSHandJointID)
Call .ToIndex()
on a Vision
Declaration
public static int ToIndex(this VisionOSHandJointID jointId)
Parameters
Type | Name | Description |
---|---|---|
Vision |
jointId | ID of the joint to convert to an index. |
Returns
Type | Description |
---|---|
int | The index matching the ID passed in. |
TryGetVisionOSRotation(XRHandJoint, out Quaternion)
Gets the pose of the joint, if available, but without the Unity-defined change to the rotation to make the reported rotation cross-platform.
Declaration
public static bool TryGetVisionOSRotation(this XRHandJoint joint, out Quaternion rotation)
Parameters
Type | Name | Description |
---|---|---|
XRHand |
joint | The joint this extension method extends. To call this extension
method, write it like
|
Quaternion | rotation | If this method returns true, this will be populated with the Apple-defined rotation for the given joint, but still converted to Unity space. |