浏览代码

Merge pull request #309 from UnityTech/fixdoccn

fix mouse tracker bug
/main
GitHub 5 年前
当前提交
f9a1430a
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 4
      Runtime/gestures/mouse_tracking.cs

4
Runtime/gestures/mouse_tracking.cs


foreach (int deviceId in trackedAnnotation.activeDevices) {
if (annotation.onExit != null) {
annotation.onExit(
PointerExitEvent.fromHoverEvent((PointerHoverEvent) this._lastMouseEvent[deviceId]));
PointerExitEvent.fromMouseEvent(this._lastMouseEvent[deviceId]));
}
#if UNITY_EDITOR
this.detachDragFromEditorAnnotation(annotation, deviceId);

if (trackedAnnotation.activeDevices.Contains(deviceId)) {
if (trackedAnnotation.annotation?.onExit != null) {
trackedAnnotation.annotation.onExit(
PointerExitEvent.fromHoverEvent((PointerHoverEvent) lastEvent));
PointerExitEvent.fromMouseEvent(lastEvent));
}
trackedAnnotation.activeDevices.Remove(deviceId);

正在加载...
取消
保存