Skip to content
This repository was archived by the owner on Apr 29, 2021. It is now read-only.

Commit 022143b

Browse files
author
Yuncong Zhang
authored
Merge pull request #309 from UnityTech/fixdoccn
fix mouse tracker bug
2 parents a18c738 + 547dbdc commit 022143b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Runtime/gestures/mouse_tracking.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public void detachAnnotation(MouseTrackerAnnotation annotation) {
109109
foreach (int deviceId in trackedAnnotation.activeDevices) {
110110
if (annotation.onExit != null) {
111111
annotation.onExit(
112-
PointerExitEvent.fromHoverEvent((PointerHoverEvent) this._lastMouseEvent[deviceId]));
112+
PointerExitEvent.fromMouseEvent(this._lastMouseEvent[deviceId]));
113113
}
114114
#if UNITY_EDITOR
115115
this.detachDragFromEditorAnnotation(annotation, deviceId);
@@ -248,7 +248,7 @@ void exitAllDevices(_TrackedAnnotation trackedAnnotation) {
248248
if (trackedAnnotation.activeDevices.Contains(deviceId)) {
249249
if (trackedAnnotation.annotation?.onExit != null) {
250250
trackedAnnotation.annotation.onExit(
251-
PointerExitEvent.fromHoverEvent((PointerHoverEvent) lastEvent));
251+
PointerExitEvent.fromMouseEvent(lastEvent));
252252
}
253253

254254
trackedAnnotation.activeDevices.Remove(deviceId);

0 commit comments

Comments
 (0)