Skip to content

Commit 18b1cc8

Browse files
committed
added sending pointer data to native for OnMouse events
1 parent ff22909 commit 18b1cc8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Packages/com.unity.inputsystem/InputSystem/InputManager.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
using UnityEngine.InputSystem.Utilities;
1616
using UnityEngine.InputSystem.Layouts;
1717
using Unity.Profiling;
18+
using UnityEngineInternal.Input;
1819

1920
#if UNITY_EDITOR
2021
using UnityEngine.InputSystem.Editor;
@@ -3646,6 +3647,9 @@ private unsafe void OnUpdate(InputUpdateType updateType, ref InputEventBuffer ev
36463647
//// mess in the event buffer
36473648
//// same goes for events that someone may queue from a change monitor callback
36483649
InvokeAfterUpdateCallback(updateType);
3650+
//send pointer data to backend for OnMouseEvents
3651+
if (Pointer.current != null && gameIsPlaying)
3652+
NativeInputSystem.SetMouseEventsData(Pointer.current.press.isPressed, Pointer.current.press.wasPressedThisFrame, Pointer.current.position.x.value, Pointer.current.position.y.value);
36493653
m_CurrentUpdate = default;
36503654
}
36513655

0 commit comments

Comments
 (0)