# XRMeshSubsystemExtension

Extensions to AR Foundation's `XRMeshSubsystem` class.

## Summary

| ### Public static functions ||
|---|---|
| [GetMeshSemantics](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRMeshSubsystemExtension#getmeshsemantics)`(this XRMeshSubsystem subsystem, MeshId meshId)` | [XRMeshSemantics](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrmeshsemantics)`[]` Gets the vertex semantics of the given mesh id. |
| [GetSceneMeshTrackingState](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRMeshSubsystemExtension#getscenemeshtrackingstate)`(this XRMeshSubsystem subsystem)` | [XRSceneMeshTrackingState](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrscenemeshtrackingstate) Get the current tracking state of the scene meshing. |
| [IsSceneMeshId](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRMeshSubsystemExtension#isscenemeshid)`(this XRMeshSubsystem subsystem, MeshId meshId)` | `bool` Checks if the given mesh id is a scene mesh id. |
| [IsSceneMeshId](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRMeshSubsystemExtension#isscenemeshid)`(this XRMeshSubsystem subsystem, TrackableId trackableId)` | `bool` Checks if the given trackable id is a scene mesh id. |

## Public static functions

### GetMeshSemantics

```c#
XRMeshSemantics[] GetMeshSemantics(
  this XRMeshSubsystem subsystem,
  MeshId meshId
)
```  
Gets the vertex semantics of the given mesh id.


| Details ||
|---|---|
| Parameters | |---|---| | `subsystem` | The XRMeshSubsystem to use. | | `meshId` | The mesh id to get the vertex semantics of. | |
| **Returns** | The vertex semantics of the mesh id as an array of `XRMeshSemantics`enums. If the mesh id is invalid or if the semantics could not be retrieved, the function will return null. |

### GetSceneMeshTrackingState

```c#
XRSceneMeshTrackingState GetSceneMeshTrackingState(
  this XRMeshSubsystem subsystem
)
```  
Get the current tracking state of the scene meshing.


| Details ||
|---|---|
| Parameters | |---|---| | `subsystem` | The XRMeshSubsystem to use. | |
| **Returns** | The scene mesh tracking state as a `XRSceneMeshTrackingState`enums. |

### IsSceneMeshId

```c#
bool IsSceneMeshId(
  this XRMeshSubsystem subsystem,
  MeshId meshId
)
```  
Checks if the given mesh id is a scene mesh id.


| Details ||
|---|---|
| Parameters | |---|---| | `subsystem` | The XRMeshSubsystem to use. | | `meshId` | The mesh id to check. | |
| **Returns** | True if the mesh id is a scene mesh id, false otherwise. |

### IsSceneMeshId

```c#
bool IsSceneMeshId(
  this XRMeshSubsystem subsystem,
  TrackableId trackableId
)
```  
Checks if the given trackable id is a scene mesh id.


| Details ||
|---|---|
| Parameters | |---|---| | `subsystem` | The XRMeshSubsystem to use. | | `trackableId` | The trackable id to check. | |
| **Returns** | True if the trackable id is a scene mesh id, false otherwise. |