November 6, 2019 update:
  • There's a new open source Cardboard SDK for iOS and Android NDK that offers a streamlined API, improved device compatibility, and built-in viewer profile QR code scanning. A corresponding Unity package (SDK) is planned for a future release. We recommend that all developers actively building for Google Cardboard migrate (iOS, Android NDK) to the new Cardboard SDK.
October 15, 2019 update:
  • The Daydream View VR headset is no longer available for purchase. However, you can continue to use the existing Google VR SDK to update and distribute your apps to the Google Play Store, and make them available to users in the Daydream app.

GvrPointerInputModuleImpl

Implementation of GvrPointerInputModule.

Summary

Properties

CurrentEventData
Gets PointerEventData from the most recent frame.
EventExecutor
Gets or sets an interface for executing events.
ModuleController
Gets or sets an interface for controlling the actual input module.
Pointer
Gets or sets the GvrBasePointer which will be responding to pointer events.
ScrollInput
Gets or sets the GvrPointerScrollInput used to route Scroll events through EventSystem.
VrModeOnly
bool
Gets or sets a value indicating whether the pointer input is active in VR Mode only or whether it is always active.

Public functions

DeactivateModule()
void
Deactivates this input module.
IsPointerOverGameObject(int pointerId)
bool
Determines whether the pointer is over a game object.
Process()
void
Process the input for the current frame.
ShouldActivateModule()
bool
Gets or sets a value indicating whether this module should be activated.

Properties

CurrentEventData

GvrPointerEventData CurrentEventData

Gets PointerEventData from the most recent frame.

The PointerEventData data from the most recent frame.

EventExecutor

IGvrEventExecutor EventExecutor

Gets or sets an interface for executing events.

An event executor interface for executing events.

ModuleController

IGvrInputModuleController ModuleController

Gets or sets an interface for controlling the actual input module.

The module controller interface for controlling the input module.

Pointer

GvrBasePointer Pointer

Gets or sets the GvrBasePointer which will be responding to pointer events.

The GvrBasePointer which will be responding to pointer events.

ScrollInput

GvrPointerScrollInput ScrollInput

Gets or sets the GvrPointerScrollInput used to route Scroll events through EventSystem.

The GvrPointerScrollInput used to route Scroll events through EventSystem.

VrModeOnly

bool VrModeOnly

Gets or sets a value indicating whether the pointer input is active in VR Mode only or whether it is always active.

Set to false if you plan to use direct screen taps or other input when not in VR Mode.

Set this to true to make input active only in VR Mode. Set to false to make input active all of the time.

Public functions

DeactivateModule

void DeactivateModule()

Deactivates this input module.

IsPointerOverGameObject

bool IsPointerOverGameObject(
  int pointerId
)

Determines whether the pointer is over a game object.

Details
Parameters
pointerId
The pointer id to check.
Returns
Returns true if this instance is pointer over game object the specified pointerId. Returns false otherwise.

Process

void Process()

Process the input for the current frame.

ShouldActivateModule

bool ShouldActivateModule()

Gets or sets a value indicating whether this module should be activated.

Details
Returns
Returns true if this module should be activated, false otherwise.