# Google.XR.Cardboard.Api

[Cardboard](https://developers.google.com/cardboard/reference/unity/namespace/Google/XR/Cardboard#namespaceGoogle_1_1XR_1_1Cardboard)[XR](https://developers.google.com/cardboard/reference/unity/namespace/Google/XR#namespaceGoogle_1_1XR) Plugin API.

## Summary

| ### Properties ||
|---|---|
| `https://developers.google.com/cardboard/reference/unity/class/Google/XR/Cardboard/Api#classGoogle_1_1XR_1_1Cardboard_1_1Api_1a17e68f98b1d88aa32b3c5515e11a5073` | `static bool` Gets a value indicating whether the close button is pressed this frame. |
| `https://developers.google.com/cardboard/reference/unity/class/Google/XR/Cardboard/Api#classGoogle_1_1XR_1_1Cardboard_1_1Api_1a82197b767efdcbbcd150671a20be7dea` | `static bool` Gets a value indicating whether the gear button is pressed this frame. |
| `https://developers.google.com/cardboard/reference/unity/class/Google/XR/Cardboard/Api#classGoogle_1_1XR_1_1Cardboard_1_1Api_1aca5c516036f0662d52a359df6a02c3a0` | `static bool` Gets a value indicating whether [Cardboard](https://developers.google.com/cardboard/reference/unity/namespace/Google/XR/Cardboard#namespaceGoogle_1_1XR_1_1Cardboard) trigger button is held pressed. |
| `https://developers.google.com/cardboard/reference/unity/class/Google/XR/Cardboard/Api#classGoogle_1_1XR_1_1Cardboard_1_1Api_1a06d00b566fb762425245687c9c12c340` | `static bool` Gets a value indicating whether the [Cardboard](https://developers.google.com/cardboard/reference/unity/namespace/Google/XR/Cardboard#namespaceGoogle_1_1XR_1_1Cardboard) trigger button is pressed this frame. |
| `https://developers.google.com/cardboard/reference/unity/class/Google/XR/Cardboard/Api#classGoogle_1_1XR_1_1Cardboard_1_1Api_1a84100d4c904ef85c33c979ba9829a2aa` | `static double` Gets or sets the amount of time the trigger must be held active to be held pressed. |

| ### Public static functions ||
|---|---|
| `https://developers.google.com/cardboard/reference/unity/class/Google/XR/Cardboard/Api#classGoogle_1_1XR_1_1Cardboard_1_1Api_1a54e37635f905505cb470741a1dc9498f()` | `bool` Evaluates whether or not device params are saved in the storage. |
| `https://developers.google.com/cardboard/reference/unity/class/Google/XR/Cardboard/Api#classGoogle_1_1XR_1_1Cardboard_1_1Api_1a9cf59d4acb253891b21b4b9f72dee5ec()` | `bool` Evaluates if device parameters changed from last time they were reloaded. |
| `https://developers.google.com/cardboard/reference/unity/class/Google/XR/Cardboard/Api#classGoogle_1_1XR_1_1Cardboard_1_1Api_1a089af663eb48a62a7028adb67950c899()` | `void` Recenters the head tracker. |
| `https://developers.google.com/cardboard/reference/unity/class/Google/XR/Cardboard/Api#classGoogle_1_1XR_1_1Cardboard_1_1Api_1ad284fe5e8201f9501319ae6a9f93bb1e()` | `void` Enables device parameter reconfiguration on next frame update. |
| `https://developers.google.com/cardboard/reference/unity/class/Google/XR/Cardboard/Api#classGoogle_1_1XR_1_1Cardboard_1_1Api_1a32c0adae36fdf94621f29683ccf1692d(string uri)` | `void` Saves the encoded device parameters provided by an URI. |
| `https://developers.google.com/cardboard/reference/unity/class/Google/XR/Cardboard/Api#classGoogle_1_1XR_1_1Cardboard_1_1Api_1a7e712232f1133a6cb7be8afba47bb5b6()` | `void` Starts QR Code scanning activity. |
| `https://developers.google.com/cardboard/reference/unity/class/Google/XR/Cardboard/Api#classGoogle_1_1XR_1_1Cardboard_1_1Api_1ae7a7bea18fe0ee781f5034626b98fe14(int velocity_filter_cutoff_frequency)` | `void` Sets the head tracker's low pass filter to stabilize the pose. |
| `https://developers.google.com/cardboard/reference/unity/class/Google/XR/Cardboard/Api#classGoogle_1_1XR_1_1Cardboard_1_1Api_1ac6df7391252426a7f54f1d84cdc6f022()` | `void` Updates screen parameters. |

## Properties

### IsCloseButtonPressed

```c#
static bool IsCloseButtonPressed
```
Gets a value indicating whether the close button is pressed this frame.

### IsGearButtonPressed

```c#
static bool IsGearButtonPressed
```
Gets a value indicating whether the gear button is pressed this frame.

### IsTriggerHeldPressed

```c#
static bool IsTriggerHeldPressed
```
Gets a value indicating whether [Cardboard](https://developers.google.com/cardboard/reference/unity/namespace/Google/XR/Cardboard#namespaceGoogle_1_1XR_1_1Cardboard) trigger button is held pressed.

### IsTriggerPressed

```c#
static bool IsTriggerPressed
```
Gets a value indicating whether the [Cardboard](https://developers.google.com/cardboard/reference/unity/namespace/Google/XR/Cardboard#namespaceGoogle_1_1XR_1_1Cardboard) trigger button is pressed this frame.

### MinTriggerHeldPressedTime

```c#
static double MinTriggerHeldPressedTime
```
Gets or sets the amount of time the trigger must be held active to be held pressed.

## Public static functions

### HasDeviceParams

```c#
bool HasDeviceParams()
```
Evaluates whether or not device params are saved in the storage.

<br />

| Details ||
|---|---|
| **Returns** | Whether or not device parameters are found. |

### HasNewDeviceParams

```c#
bool HasNewDeviceParams()
```
Evaluates if device parameters changed from last time they were reloaded.

<br />

| Details ||
|---|---|
| **Returns** | true when device parameters changed. |

### Recenter

```c#
void Recenter()
```
Recenters the head tracker.

### ReloadDeviceParams

```c#
void ReloadDeviceParams()
```
Enables device parameter reconfiguration on next frame update.

### SaveDeviceParams

```c#
void SaveDeviceParams(
  string uri
)
```
Saves the encoded device parameters provided by an URI.

Expected URI format for:

- [Cardboard](https://developers.google.com/cardboard/reference/unity/namespace/Google/XR/Cardboard#namespaceGoogle_1_1XR_1_1Cardboard) Viewer v1: <https://g.co/cardboard>
- [Cardboard](https://developers.google.com/cardboard/reference/unity/namespace/Google/XR/Cardboard#namespaceGoogle_1_1XR_1_1Cardboard) Viewer v2: <https://google.com/cardboard/cfd?p=deviceParams> (for example, <https://google.com/cardboard/cfg?p=CgZHb29nbGUSEkNhcmRib2FyZCBJL08gMjAxNR0rGBU9JQHegj0qEAAASEIAAEhCAABIQgAASEJYADUpXA89OggeZnc-Ej6aPlAAYAM>).

<br />

Redirection is also supported up to a maximum of 5 possible redirects before reaching the proper pattern.

Only URIs using HTTPS protocol are supported.

<br />

Details Parameters `uri` The URI string. See above for supported formats.

### ScanDeviceParams

```c#
void ScanDeviceParams()
```
Starts QR Code scanning activity.

### SetLowPassFilter

```c#
void SetLowPassFilter(
  int velocity_filter_cutoff_frequency
)
```
Sets the head tracker's low pass filter to stabilize the pose.

<br />

Details Parameters `velocity_filter_cutoff_frequency` Cutoff frequency for the velocity filter of the head tracker. head tracker.

### UpdateScreenParams

```c#
void UpdateScreenParams()
```
Updates screen parameters.

This method must be called at framerate to ensure the current screen orientation is properly taken into account by the head tracker.