# GvrDaydreamApi Class Reference

# GvrDaydreamApi

Main entry point Daydream specific APIs.

## Summary

This class automatically instantiates an instance when this API is used for the first time. For explicit control over when the instance is created and the Java references are setup call the provided `CreateAsync` method, for example when no UI is being displayed to the user.

### Inheritance

Inherits from: IDisposable

| ### Properties ||
|---|---|
| `https://developers.google.com/vr/reference/unity/class/GvrDaydreamApi#classGvrDaydreamApi_1aab4181c99b9032f727a02b8e22047ffc` | `static bool` Gets a value indicating whether the `https://developers.google.com/vr/reference/unity/class/GvrDaydreamApi#classGvrDaydreamApi` has been created. |

| ### Public static functions ||
|---|---|
| `https://developers.google.com/vr/reference/unity/class/GvrDaydreamApi#classGvrDaydreamApi_1ad3ec4a16354965150d224ff2b976db61()` | `void` **[Deprecated.](https://developers.google.com/vr/reference/unity/deprecated/deprecated)** [Create()](https://developers.google.com/vr/reference/unity/class/GvrDaydreamApi#classGvrDaydreamApi_1ad3ec4a16354965150d224ff2b976db61) without arguments is deprecated. Use CreateAsync(callback) instead. Creates a generic asynchronous callback. |
| `https://developers.google.com/vr/reference/unity/class/GvrDaydreamApi#classGvrDaydreamApi_1a469b527821bd0ea89ca29ccee3f1d8a0(Action< bool > callback)` | `void` Asynchronously instantiates a `GvrDayreamApi`. |
| `https://developers.google.com/vr/reference/unity/class/GvrDaydreamApi#classGvrDaydreamApi_1a1a3e78c09b21b8b84aa403e8e87cf417()` | `void` **[Deprecated.](https://developers.google.com/vr/reference/unity/deprecated/deprecated)** Use `LaunchVrHomeAsync(callback)` instead. Launches a generic asynchronous VR Home call. |
| `https://developers.google.com/vr/reference/unity/class/GvrDaydreamApi#classGvrDaydreamApi_1a13e268334596e00970f87cc6f75ceec3(Action< bool > callback)` | `void` Asynchronously launches VR Home. |

## Properties

### IsCreated

```c#
static bool IsCreated
```
Gets a value indicating whether the `https://developers.google.com/vr/reference/unity/class/GvrDaydreamApi#classGvrDaydreamApi` has been created.

Value `true` if the [GvrDaydreamApi](https://developers.google.com/vr/reference/unity/class/GvrDaydreamApi#classGvrDaydreamApi) has been created, `false` otherwise.

## Public static functions

### Create

```c#
void Create()
```
Creates a generic asynchronous callback.

**[Deprecated.](https://developers.google.com/vr/reference/unity/deprecated/deprecated)** [Create()](https://developers.google.com/vr/reference/unity/class/GvrDaydreamApi#classGvrDaydreamApi_1ad3ec4a16354965150d224ff2b976db61) without arguments is deprecated. Use CreateAsync(callback) instead.

### CreateAsync

```c#
void CreateAsync(
  Action< bool > callback
)
```
Asynchronously instantiates a `GvrDayreamApi`.

The provided callback will be called with a bool argument indicating whether instance creation was successful.

<br />

| Details ||
|---|---|
| Parameters | |---|---| | `callback` | A callback to make after creating a `https://developers.google.com/vr/reference/unity/class/GvrDaydreamApi#classGvrDaydreamApi`. | |

### LaunchVrHome

```c#
void LaunchVrHome()
```
Launches a generic asynchronous VR Home call.

**[Deprecated.](https://developers.google.com/vr/reference/unity/deprecated/deprecated)** Use `LaunchVrHomeAsync(callback)` instead.

### LaunchVrHomeAsync

```c#
void LaunchVrHomeAsync(
  Action< bool > callback
)
```
Asynchronously launches VR Home.

Instantiates an instance of [GvrDaydreamApi](https://developers.google.com/vr/reference/unity/class/GvrDaydreamApi#classGvrDaydreamApi) if necessary. If successful, launches VR Home.

The provided callback will be called with a bool argument indicating whether instance creation and launch of VR Home was successful.

<br />

| Details ||
|---|---|
| Parameters | |---|---| | `callback` | A callback to make after launching the VrHome screen. | |