GvrSettings

Accesses and configures Daydream settings.

Summary

Public types

UserPrefsHandedness{
  Error = -1,
  Right,
  Left
}
enum
Handedness preference values.
ViewerPlatformType{
  Error = -1,
  Cardboard,
  Daydream
}
enum
Viewer type.

Public attributes

VR_SDK_CARDBOARD = "cardboard"
const string
Name of Cardboard GVR SDK, as returned by VRSettings.loadedDeviceName.
VR_SDK_DAYDREAM = "daydream"
const string
Name of Daydream GVR SDK, as returned by VRSettings.loadedDeviceName.
VR_SDK_NONE = "None"
const string
Name of 'None' VR SDK, as returned by VRSettings.loadedDeviceName.

Properties

Handedness
Gets the user's handedness preference value.
SustainedPerformanceMode
static bool
Sets a value indicating whether sustained performance mode is enabled.
ViewerPlatform
Gets the viewer platform type setting.

Public static functions

GetValidGvrNativePtrOrLogError()
IntPtr
Wraps call to VRDevice.GetNativePtr().

Public types

UserPrefsHandedness

 UserPrefsHandedness

Handedness preference values.

Properties
Error

An error value indicating that something has gone wrong.

Plugin-only value, does not exist in the NDK.

Left

A left-handed preference.

Right

A right-handed preference.

ViewerPlatformType

 ViewerPlatformType

Viewer type.

Properties
Cardboard

The Google Cardboard platform.

Daydream

The Google Daydream platform.

Error

An error value indicating that something has gone wrong.

Plugin-only value, does not exist in the NDK.

Public attributes

VR_SDK_CARDBOARD

const string VR_SDK_CARDBOARD = "cardboard"

Name of Cardboard GVR SDK, as returned by VRSettings.loadedDeviceName.

VR_SDK_DAYDREAM

const string VR_SDK_DAYDREAM = "daydream"

Name of Daydream GVR SDK, as returned by VRSettings.loadedDeviceName.

VR_SDK_NONE

const string VR_SDK_NONE = "None"

Name of 'None' VR SDK, as returned by VRSettings.loadedDeviceName.

Properties

Handedness

static UserPrefsHandedness Handedness

Gets the user's handedness preference value.

The user's handedness preference value.

SustainedPerformanceMode

static bool SustainedPerformanceMode

Sets a value indicating whether sustained performance mode is enabled.

The developer is expected to remember whether sustained performance mode is set at runtime, via the checkbox in Player Settings.

This state may be recorded here in a future release.

The sustained performance mode setting.

ViewerPlatform

static ViewerPlatformType ViewerPlatform

Gets the viewer platform type setting.

In the editor this can be set for devlopment testing.

The viewer platform type setting.

Public static functions

GetValidGvrNativePtrOrLogError

IntPtr GetValidGvrNativePtrOrLogError()

Wraps call to VRDevice.GetNativePtr().

Logs error if a supported GVR SDK is not active or if the returned native pointer is IntPtr.Zero.

Details
Returns
An int pointer representing a GVR context.