Class XRHandJointIDUtility
Houses extension and utility methods for XRHandJointID.
Namespace: UnityEngine.XR.Hands
Syntax
public static class XRHandJointIDUtility
Methods
FromIndex(Int32)
Call this to get the corresponding XRHandJointID from an index into an array of associated data.
Declaration
public static XRHandJointID FromIndex(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | Index to convert to an ID. |
Returns
Type | Description |
---|---|
XRHandJointID | The ID matching the index passed in. |
GetBackJointID(XRHandFingerID)
Gets the last valid XRHandJointID of a given XRHandFingerID.
Declaration
public static XRHandJointID GetBackJointID(this XRHandFingerID fingerId)
Parameters
Type | Name | Description |
---|---|---|
XRHandFingerID | fingerId | ID of the finger you want the last valid XRHandJointID of. |
Returns
Type | Description |
---|---|
XRHandJointID | Last valid XRHandJointID for the given finger. |
GetFrontJointID(XRHandFingerID)
Gets the first valid XRHandJointID of a given XRHandFingerID.
Declaration
public static XRHandJointID GetFrontJointID(this XRHandFingerID fingerId)
Parameters
Type | Name | Description |
---|---|---|
XRHandFingerID | fingerId | ID of the finger you want the first valid XRHandJointID of. |
Returns
Type | Description |
---|---|
XRHandJointID | First valid XRHandJointID for the given finger. |
ToIndex(XRHandJointID)
Call .ToIndex()
on a XRHandJointID to get its
corresponding index into an array of joint data.
Declaration
public static int ToIndex(this XRHandJointID jointId)
Parameters
Type | Name | Description |
---|---|---|
XRHandJointID | jointId | ID of the joint to convert to an index. |
Returns
Type | Description |
---|---|
Int32 | The index matching the ID passed in. |