# XRStats

> Provides timing and other statistics from XR subsystems.

## Definition

* **Type:** Class
* **Namespace:** [UnityEngine.XR.Provider](/engine/6000.3/script-reference/unityengine/xr/provider.md)
* **Assembly:** UnityEngine.XRModule

```csharp
public static class XRStats
```

## Remarks

The XRStats class allows XR SDK providers to expose timing and other statistics related to their XR subsystems. Such statistics can be used by XR application developers for profiling and making dynamic performance adjustments. For example, an application could dynamically adjust properties like [XRSettings.eyeTextureResolutionScale](/engine/6000.3/script-reference/unityengine/xr/xrsettings/eyetextureresolutionscale.md) or [XRSettings.renderViewportScale](/engine/6000.3/script-reference/unityengine/xr/xrsettings/renderviewportscale.md) at run time to improve performance based on statistics provided by an XR subsystem.

`Note:` XR SDK providers can use this class to provide their own, device-specific class for reporting statistics. XR application developers should not need to use the XRStats class directly.

## Static Methods

| Method                                                                                      | Description                               |
| ------------------------------------------------------------------------------------------- | ----------------------------------------- |
| [TryGetStat](/engine/6000.3/script-reference/unityengine/xr/provider/xrstats/trygetstat.md) | Retrieve a statistic for an XR subsystem. |
