Skip to content

Commit b9fcced

Browse files
committed
set data and trigger sending events both from package
1 parent 937d7b6 commit b9fcced

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3706,8 +3706,9 @@ private unsafe void OnUpdate(InputUpdateType updateType, ref InputEventBuffer ev
37063706
InvokeAfterUpdateCallback(updateType);
37073707
//send pointer data to backend for OnMouseEvents
37083708
#if UNITY_6000_4_OR_NEWER
3709-
if (Pointer.current != null && gameIsPlaying)
3710-
NativeInputSystem.SetMouseEventsData(Pointer.current.press.isPressed, Pointer.current.press.wasPressedThisFrame, Pointer.current.position.x.value, Pointer.current.position.y.value);
3709+
var pointer = Pointer.current;
3710+
if (pointer != null && gameIsPlaying)
3711+
NativeInputSystem.DoSendMouseEvents(pointer.press.isPressed, pointer.press.wasPressedThisFrame, pointer.position.x.value, pointer.position.y.value);
37113712
#endif
37123713
m_CurrentUpdate = default;
37133714
}

0 commit comments

Comments
 (0)