mrtk_developmentreleases/2.0.0releases/2.1.0releases/2.2.0

    Show / Hide Table of Contents

    Interface IMixedRealityEventSystem

    Interface used to implement an Event System that is compatible with the Mixed Reality Toolkit.

    Inherited Members
    IMixedRealityService.Name
    IMixedRealityService.Priority
    IMixedRealityService.ConfigurationProfile
    IMixedRealityService.Initialize()
    IMixedRealityService.Reset()
    IMixedRealityService.Enable()
    IMixedRealityService.Update()
    IMixedRealityService.LateUpdate()
    IMixedRealityService.Disable()
    IMixedRealityService.Destroy()
    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

    See: https://docs.unity3d.com/Manual/MessagingSystem.html

    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

    See: https://docs.unity3d.com/Manual/MessagingSystem.html

    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.

    In This Article
    • Properties
      • EventListeners
      • EventListeners
    • Methods
      • HandleEvent<T>(BaseEventData, ExecuteEvents.EventFunction<T>)
      • HandleEvent<T>(BaseEventData, ExecuteEvents.EventFunction<T>)
      • Register(GameObject)
      • Register(GameObject)
      • RegisterHandler<T>(IEventSystemHandler)
      • RegisterHandler<T>(IEventSystemHandler)
      • Unregister(GameObject)
      • Unregister(GameObject)
      • UnregisterHandler<T>(IEventSystemHandler)
      • UnregisterHandler<T>(IEventSystemHandler)
    Back to top Generated by DocFX