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.

IGvrInputModuleController

Interface for manipulating an input module used by GvrPointerInputModuleImpl.

Summary

Inheritance

Direct Known Subclasses:GvrPointerInputModule

Properties

RaycastResultCache
List< RaycastResult >
Gets the raycast result cache list.
eventSystem
EventSystem
Gets a reference to the event system.

Public functions

Deactivate()
void
Deactivate the controller.
FindCommonRoot(GameObject g1, GameObject g2)
GameObject
Given two game objects, return a common root game object, or null if there is no common root.
FindFirstRaycast(List< RaycastResult > candidates)
RaycastResult
Return the first valid raycast result.
GetBaseEventData()
BaseEventData
Gets a BaseEventData that can be used by the EventSystem.
ShouldActivate()
bool
Whether the controller should be activated.

Properties

RaycastResultCache

List< RaycastResult > RaycastResultCache

Gets the raycast result cache list.

The raycast result cache list.

eventSystem

EventSystem eventSystem

Gets a reference to the event system.

A reference to the event system.

Public functions

Deactivate

void Deactivate()

Deactivate the controller.

FindCommonRoot

GameObject FindCommonRoot(
  GameObject g1,
  GameObject g2
)

Given two game objects, return a common root game object, or null if there is no common root.

Details
Parameters
g1
The first GameObject.
g2
The second GameObject.
Returns
The common root.

FindFirstRaycast

RaycastResult FindFirstRaycast(
  List< RaycastResult > candidates
)

Return the first valid raycast result.

Details
Parameters
candidates
The list of RaycastResults to search for the first Raycast.
Returns
The first raycast.

GetBaseEventData

BaseEventData GetBaseEventData()

Gets a BaseEventData that can be used by the EventSystem.

Details
Returns
A BaseEventData that can be used by the EventSystem.

ShouldActivate

bool ShouldActivate()

Whether the controller should be activated.

Details
Returns
Returns true if the controller should be activated, false otherwise.