# XRAvatarSkeletonJointIDUtility

Utility class for [XRAvatarSkeletonJointID](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xravatarskeletonjointid).

## Summary

|                                                                                                                                                                                                                                                                                                                   ### Public static functions                                                                                                                                                                                                                                                                                                                    ||
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [FromIndex](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRAvatarSkeletonJointIDUtility#fromindex)`(int index)`                                                                                                                                             | [XRAvatarSkeletonJointID](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xravatarskeletonjointid) Gets the corresponding [XRAvatarSkeletonJointID](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xravatarskeletonjointid) from an index into an array of associated data. |
| [JointCount](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRAvatarSkeletonJointIDUtility#jointcount)`()`                                                                                                                                                    | `int` Gets the count of joints provided by an avatar skeleton.                                                                                                                                                                                                                                                                                               |
| [ToIndex](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRAvatarSkeletonJointIDUtility#toindex)`(this `[XRAvatarSkeletonJointID](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xravatarskeletonjointid)` jointId)` | `int` Converts [XRAvatarSkeletonJointID](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xravatarskeletonjointid) to its corresponding index into an array of joint data.                                                                                                                                            |

## Public static functions

### FromIndex

```c#
XRAvatarSkeletonJointID FromIndex(
  int index
)
```  
Gets the corresponding [XRAvatarSkeletonJointID](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xravatarskeletonjointid) from an index into an array of associated data.


|                                            Details                                             ||
|-------------|-----------------------------------------------------------------------------------|
| Parameters  | |---------|----------------------------| | `index` | Index to convert to an ID. | |
| **Returns** | The ID matching the index passed in.                                              |

### JointCount

```c#
int JointCount()
```  
Gets the count of joints provided by an avatar skeleton.


|                         Details                          ||
|-------------|---------------------------------------------|
| **Returns** | The amount of joints of an avatar skeleton. |

### ToIndex

```c#
int ToIndex(
  this XRAvatarSkeletonJointID jointId
)
```  
Converts [XRAvatarSkeletonJointID](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xravatarskeletonjointid) to its corresponding index into an array of joint data.


|                                                           Details                                                            ||
|-------------|-----------------------------------------------------------------------------------------------------------------|
| Parameters  | |-----------|-----------------------------------------| | `jointId` | ID of the joint to convert to an index. | |
| **Returns** | The index matching the ID passed in.                                                                            |