October 15, 2019 update:
  • The Daydream View VR headset is no longer available for purchase. However, developers can continue to use the existing Google VR SDK to update and distribute their apps to the Google Play Store, and make them available to users in the Daydream app.

GvrEventExecutor

Wraps UnityEngine.EventSystems.ExecuteEvents.

Summary

Also, exposes event delegates to allow global handling of events.

Inheritance

Inherits from: IGvrEventExecutor

Constructors and Destructors

GvrEventExecutor()
Initializes a new instance of the GvrEventExecutor class.

Properties

OnPointerClick
Adds or removes delegate functions for the OnPointerClick event.
OnPointerDown
Adds or removes delegate functions for the OnPointerDown event.
OnPointerEnter
Adds or removes delegate functions for the OnPointerEnter event.
OnPointerExit
Adds or removes delegate functions for the OnPointerExit event.
OnPointerUp
Adds or removes delegate functions for the OnPointerUp event.
OnScroll
Adds or removes delegate functions for the OnScroll event.

Public functions

EventDelegate(GameObject target, PointerEventData eventData)
delegate void
Delegate type for handling pointer events.
Execute< T >(GameObject target, BaseEventData eventData, ExecuteEvents.EventFunction< T > functor)
bool
Execute the specified target, eventData and functor.
ExecuteHierarchy< T >(GameObject root, BaseEventData eventData, ExecuteEvents.EventFunction< T > callbackFunction)
GameObject
Executes the hierarchy.
GetEventHandler< T >(GameObject root)
GameObject
Gets the event handler.

Properties

OnPointerClick

EventDelegate OnPointerClick

Adds or removes delegate functions for the OnPointerClick event.

OnPointerDown

EventDelegate OnPointerDown

Adds or removes delegate functions for the OnPointerDown event.

OnPointerEnter

EventDelegate OnPointerEnter

Adds or removes delegate functions for the OnPointerEnter event.

OnPointerExit

EventDelegate OnPointerExit

Adds or removes delegate functions for the OnPointerExit event.

OnPointerUp

EventDelegate OnPointerUp

Adds or removes delegate functions for the OnPointerUp event.

OnScroll

EventDelegate OnScroll

Adds or removes delegate functions for the OnScroll event.

Public functions

EventDelegate

delegate void EventDelegate(
  GameObject target,
  PointerEventData eventData
)

Delegate type for handling pointer events.

Details
Parameters
target
The GameObject to add this behavior to.
eventData
The context data of the Event which triggered this call.

Execute< T >

bool Execute< T >(
  GameObject target,
  BaseEventData eventData,
  ExecuteEvents.EventFunction< T > functor
)

Execute the specified target, eventData and functor.

Details
Parameters
target
The GameObject to execute this event behavior on.
eventData
The triggering EventData.
functor
The delegate call's implementation.
Template Parameters
T
The 1st type parameter.
Returns
Returns true if the method successfully executes, false otherwise.

ExecuteHierarchy< T >

GameObject ExecuteHierarchy< T >(
  GameObject root,
  BaseEventData eventData,
  ExecuteEvents.EventFunction< T > callbackFunction
)

Executes the hierarchy.

Details
Parameters
root
The top-level object this event should trigger.
eventData
The triggering EventData.
callbackFunction
Callback function.
Template Parameters
T
The 1st type parameter.
Returns
The hierarchy.

GetEventHandler< T >

GameObject GetEventHandler< T >(
  GameObject root
)

Gets the event handler.

Details
Parameters
root
The top-level object this event should trigger.
Template Parameters
T
The 1st type parameter.
Returns
The event handler.

GvrEventExecutor

 GvrEventExecutor()

Initializes a new instance of the GvrEventExecutor class.