Class GenericBaseEventData
Generic Base Event Data for Sending Events through the Event System.
Inheritance
Namespace: Microsoft.MixedReality.Toolkit
Assembly: cs.temp.dll.dll
Syntax
public class GenericBaseEventData : BaseEventData
Constructors
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 |
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. |