InputSystem icon indicating copy to clipboard operation
InputSystem copied to clipboard

CallbackContext.duration is computed incorrectly in the editor

Open mstevenson opened this issue 7 years ago • 1 comments

The CallbackContext object passed to an InputAction.performed event handler includes an incorrect duration value. It appears that CallbackContext.startTime is approximately equal to Time.time, however CallbackContext.time is precisely equal to EditorApplication.timeSinceStartup.

Thus the duration value is computed as the time since the editor was launched minus the time since play mode was started, which is a nonsensical value.

  • Unity 2019.1.0f2
  • Input System 0.2.8-preview

mstevenson avatar May 01 '19 22:05 mstevenson

Finally filed: https://issuetracker.unity3d.com/product/unity/issues/guid/1164162/ Closing.

JiaUnity avatar Jun 20 '19 02:06 JiaUnity