IGvrEventExecutor

Provides an interface for executing events for IEventSystemHandler.

Summary

Inheritance

Direct Known Subclasses:GvrEventExecutor

Public functions

Execute< T >(GameObject target, BaseEventData eventData, ExecuteEvents.EventFunction< T > functor)
bool
Execute the event of type T : IEventSystemHandler on the game object.
ExecuteHierarchy< T >(GameObject root, BaseEventData eventData, ExecuteEvents.EventFunction< T > callbackFunction)
GameObject
Recurse up the hierarchy calling Execute until there is a game object that can handle the event.
GetEventHandler< T >(GameObject root)
GameObject
Traverse the object hierarchy starting at root, and return the game object which implements the event handler of type T.

Public functions

Execute< T >

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

Execute the event of type T : IEventSystemHandler on the game object.

The event will be executed on all components on the game object that can handle it.

Details
Parameters
target
Target game object.
eventData
Data associated with the executing event.
functor
Function to execute on the game object components.
Template Parameters
T
An interface with methods for handling events.
Returns
A value indicating whether the delegate successfully executed.

ExecuteHierarchy< T >

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

Recurse up the hierarchy calling Execute until there is a game object that can handle the event.

See https://docs.unity3d.com/2017.4/Documentation/ScriptReference/EventSystems.ExecuteEvents.ExecuteHierarchy.html.

Details
Parameters
root
Start game object for search.
eventData
Data associated with the executing event.
callbackFunction
Function to execute on the game object components.
Template Parameters
T
An interface with methods for handling events.
Returns
GameObject Game object that handled the event.

GetEventHandler< T >

GameObject GetEventHandler< T >(
  GameObject root
)

Traverse the object hierarchy starting at root, and return the game object which implements the event handler of type T.

Note:Traversal is performed upwards from the target object, not down.

Details
Parameters
root
The root object to which to send event triggers.
Template Parameters
T
An interface with methods for handling events.
Returns
The event handler.