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.

<GVRWidgetViewDelegate> Protocol

<GVRWidgetViewDelegate> Protocol Reference

Overview

Defines a delegate for GVRWidgetView and its subclasses.

Inherits <UIViewNSObject>.

Instance Method Summary

(void) - widgetViewDidTap:
 Called when the user taps the widget view. More...
 
(void) - widgetView:didChangeDisplayMode:
 Called when the widget view's display mode changes. More...
 
(void) - widgetView:didLoadContent:
 Called when the content is successfully loaded. More...
 
(void) - widgetView:didFailToLoadContent:withErrorMessage:
 Called when there is an error loading content in the widget view. More...
 

Method Detail

- (void) widgetViewDidTap: (GVRWidgetView *)  widgetView
optional

Called when the user taps the widget view.

This corresponds to the Cardboard viewer's trigger event.

- (void) widgetView: (GVRWidgetView *)  widgetView
didChangeDisplayMode: (GVRWidgetDisplayMode)  displayMode 
optional

Called when the widget view's display mode changes.

See ::GVRWidgetDisplayMode.

- (void) widgetView: (GVRWidgetView *)  widgetView
didLoadContent: (id)  content 
optional

Called when the content is successfully loaded.

- (void) widgetView: (GVRWidgetView *)  widgetView
didFailToLoadContent: (id)  content
withErrorMessage: (NSString *)  errorMessage 
optional

Called when there is an error loading content in the widget view.