mrtk_developmentreleases/2.0.0releases/2.1.0releases/2.2.0

    Show / Hide Table of Contents

    Class GenericBaseEventData

    Generic Base Event Data for Sending Events through the Event System.

    Inheritance
    Object
    GenericBaseEventData
    BoundaryEventData
    DiagnosticsEventData
    PlacementEventData
    MixedRealitySpatialAwarenessEventData
    TeleportEventData
    Implements
    BaseEventData
    Namespace: Microsoft.MixedReality.Toolkit
    Assembly: cs.temp.dll.dll
    Syntax
    public class GenericBaseEventData : BaseEventData, BaseEventData

    Constructors

    GenericBaseEventData(EventSystem)

    Constructor.

    Declaration
    public GenericBaseEventData(EventSystem eventSystem)
    Parameters
    Type Name Description
    EventSystem eventSystem

    Usually EventSystems.EventSystem.current

    GenericBaseEventData(EventSystem)

    Constructor.

    Declaration
    public GenericBaseEventData(EventSystem eventSystem)
    Parameters
    Type Name Description
    EventSystem eventSystem

    Usually EventSystems.EventSystem.current

    Properties

    EventSource

    The Event Source that the event originates from.

    Declaration
    public IMixedRealityEventSource EventSource { get; }
    Property Value
    Type Description
    IMixedRealityEventSource

    EventSource

    The Event Source that the event originates from.

    Declaration
    public IMixedRealityEventSource EventSource { get; }
    Property Value
    Type Description
    IMixedRealityEventSource

    EventTime

    The UTC time at which the event occurred.

    Declaration
    public DateTime EventTime { get; }
    Property Value
    Type Description
    DateTime

    EventTime

    The UTC time at which the event occurred.

    Declaration
    public DateTime EventTime { get; }
    Property Value
    Type Description
    DateTime

    selectedObject

    The BaseEventData.selectedObject is explicitly hidden because access to it (either via get or set) throws a NullReferenceException in typical usage within the MRTK. Prefer using the subclasses own fields to access information about the event instead of fields on BaseEventData.

    Declaration
    public GameObject selectedObject { get; protected set; }
    Property Value
    Type Description
    GameObject
    Remarks

    BaseEventData is only used because it's part of Unity's EventSystem dispatching, so this code must subclass it in order to leverage EventSystem.ExecuteEvents

    Methods

    BaseInitialize(IMixedRealityEventSource)

    Used to initialize/reset the event and populate the data.

    Declaration
    protected void BaseInitialize(IMixedRealityEventSource eventSource)
    Parameters
    Type Name Description
    IMixedRealityEventSource eventSource

    The source of the event.

    BaseInitialize(IMixedRealityEventSource)

    Used to initialize/reset the event and populate the data.

    Declaration
    protected void BaseInitialize(IMixedRealityEventSource eventSource)
    Parameters
    Type Name Description
    IMixedRealityEventSource eventSource

    The source of the event.

    Implements

    BaseEventData
    In This Article
    • Constructors
      • GenericBaseEventData(EventSystem)
      • GenericBaseEventData(EventSystem)
    • Properties
      • EventSource
      • EventSource
      • EventTime
      • EventTime
      • selectedObject
    • Methods
      • BaseInitialize(IMixedRealityEventSource)
      • BaseInitialize(IMixedRealityEventSource)
    • Implements
    Back to top Generated by DocFX