This site has been archived and remains strictly as a historical reference for developers who actively maintain apps built using the legacy Google VR SDK, which was last updated in 2019 and is no longer receiving updates.
  • All developers actively developing experiences for Google Cardboard should use the new open source Cardboard SDKs for iOS, Android NDK, and Unity XR Plugin. These new SDKs offer streamlined APIs, improved device compatibility, and built-in viewer profile QR code scanning.
  • The Daydream View VR headset is no longer available for purchase as of October 15, 2019. Existing apps on supported devices are unaffected for users who previously installed those applications. It is no longer possible to opt-in to Daydream distribution via Google Play.
Stay organized with collections Save and categorize content based on your preferences.

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.