Interface IMixedRealityEventSystem
Interface used to implement an Event System that is compatible with the Mixed Reality Toolkit.
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit
Assembly: cs.temp.dll.dll
Syntax
public interface IMixedRealityEventSystem : IMixedRealityService, IDisposable
Properties
EventListeners
List of event listeners that are registered to this Event System.
Declaration
List<GameObject> EventListeners { get; }
Property Value
Type | Description |
---|---|
List<GameObject> |
Remarks
This collection is obsolete and is replaced by handler-based internal storage. It will be removed in a future release.
EventListeners
List of event listeners that are registered to this Event System.
Declaration
List<GameObject> EventListeners { get; }
Property Value
Type | Description |
---|---|
List<GameObject> |
Remarks
This collection is obsolete and is replaced by handler-based internal storage. It will be removed in a future release.
Methods
HandleEvent<T>(BaseEventData, ExecuteEvents.EventFunction<T>)
The main function for handling and forwarding all events to their intended recipients.
Declaration
void HandleEvent<T>(BaseEventData eventData, ExecuteEvents.EventFunction<T> eventHandler)
where T : IEventSystemHandler
Parameters
Type | Name | Description |
---|---|---|
BaseEventData | eventData | Event Data |
ExecuteEvents.EventFunction<T> | eventHandler | Event Handler delegate |
Type Parameters
Name | Description |
---|---|
T | Event Handler Interface Type |
Remarks
HandleEvent<T>(BaseEventData, ExecuteEvents.EventFunction<T>)
The main function for handling and forwarding all events to their intended recipients.
Declaration
void HandleEvent<T>(BaseEventData eventData, ExecuteEvents.EventFunction<T> eventHandler)
where T : IEventSystemHandler
Parameters
Type | Name | Description |
---|---|---|
BaseEventData | eventData | Event Data |
ExecuteEvents.EventFunction<T> | eventHandler | Event Handler delegate |
Type Parameters
Name | Description |
---|---|
T | Event Handler Interface Type |
Remarks
Register(GameObject)
Registers a GameObject to listen for events from this Event System.
Declaration
void Register(GameObject listener)
Parameters
Type | Name | Description |
---|---|---|
GameObject | listener | GameObject to add to EventListeners. |
Register(GameObject)
Registers a GameObject to listen for events from this Event System.
Declaration
void Register(GameObject listener)
Parameters
Type | Name | Description |
---|---|---|
GameObject | listener | GameObject to add to EventListeners. |
RegisterHandler<T>(IEventSystemHandler)
Registers the given handler as a global listener for all events handled via the T interface. T must be an interface type, not a class type, derived from IEventSystemHandler.
Declaration
void RegisterHandler<T>(IEventSystemHandler handler)
where T : IEventSystemHandler
Parameters
Type | Name | Description |
---|---|---|
IEventSystemHandler | handler | Handler to receive global input events of specified handler type. |
Type Parameters
Name | Description |
---|---|
T |
Remarks
If you want to register a single C# object as global handler for several event handling interfaces, you must call this function for each interface type.
RegisterHandler<T>(IEventSystemHandler)
Registers the given handler as a global listener for all events handled via the T interface. T must be an interface type, not a class type, derived from IEventSystemHandler.
Declaration
void RegisterHandler<T>(IEventSystemHandler handler)
where T : IEventSystemHandler
Parameters
Type | Name | Description |
---|---|---|
IEventSystemHandler | handler | Handler to receive global input events of specified handler type. |
Type Parameters
Name | Description |
---|---|
T |
Remarks
If you want to register a single C# object as global handler for several event handling interfaces, you must call this function for each interface type.
Unregister(GameObject)
Unregisters a GameObject from listening for events from this Event System.
Declaration
void Unregister(GameObject listener)
Parameters
Type | Name | Description |
---|---|---|
GameObject | listener | GameObject to remove from EventListeners. |
Unregister(GameObject)
Unregisters a GameObject from listening for events from this Event System.
Declaration
void Unregister(GameObject listener)
Parameters
Type | Name | Description |
---|---|---|
GameObject | listener | GameObject to remove from EventListeners. |
UnregisterHandler<T>(IEventSystemHandler)
Unregisters the given handler as a global listener for all events handled via the T interface. T must be an interface type, not a class type, derived from IEventSystemHandler.
Declaration
void UnregisterHandler<T>(IEventSystemHandler handler)
where T : IEventSystemHandler
Parameters
Type | Name | Description |
---|---|---|
IEventSystemHandler | handler | Handler to stop receiving global input events of specified handler type. |
Type Parameters
Name | Description |
---|---|
T |
Remarks
If a single C# object listens to global input events for several event handling interfaces, you must call this function for each interface type.
UnregisterHandler<T>(IEventSystemHandler)
Unregisters the given handler as a global listener for all events handled via the T interface. T must be an interface type, not a class type, derived from IEventSystemHandler.
Declaration
void UnregisterHandler<T>(IEventSystemHandler handler)
where T : IEventSystemHandler
Parameters
Type | Name | Description |
---|---|---|
IEventSystemHandler | handler | Handler to stop receiving global input events of specified handler type. |
Type Parameters
Name | Description |
---|---|
T |
Remarks
If a single C# object listens to global input events for several event handling interfaces, you must call this function for each interface type.