AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
PointerInputEventData.cs
Go to the documentation of this file.
1 // Copyright (c) Microsoft Corporation. All rights reserved.
2 // Licensed under the MIT License. See LICENSE in the project root for license information.
3 
4 using UnityEngine;
5 using UnityEngine.EventSystems;
6 
7 namespace HoloToolkit.Unity.InputModule
8 {
12  public class PointerInputEventData : PointerEventData, IInputSourceInfoProvider
13  {
14  public IInputSource InputSource { get; set; }
15 
16  public uint SourceId { get; set; }
17 
18  public PointerInputEventData(EventSystem eventSystem) : base(eventSystem)
19  {
20  }
21 
22  public void Clear()
23  {
24  Reset();
25  button = InputButton.Left;
26  clickCount = 0;
27  clickTime = 0;
28  delta = Vector2.zero;
29  dragging = false;
30  eligibleForClick = false;
31  pointerCurrentRaycast = default(RaycastResult);
32  pointerDrag = null;
33  pointerEnter = null;
34  pointerId = 0;
35  pointerPress = null;
36  pointerPressRaycast = default(RaycastResult);
37  position = Vector2.zero;
38  pressPosition = Vector2.zero;
39  rawPointerPress = null;
40  scrollDelta = Vector2.zero;
41  selectedObject = null;
42  useDragThreshold = false;
43  InputSource = null;
44  SourceId = 0;
45  }
46  }
47 }
Describes a Unity pointer event that was generated by a specific input source and ID...
IInputSourceInfoProvider gives you the input source like hands or motion controller. It will also report the source id for that source.
Interface for an input source. An input source can be anything that a user can use to interact with a...
Definition: IInputSource.cs:12