Skip to content

FIX: [Port] [UUM-147719] [Input System] Changed input action timeout to not trigger during before-render period - #2486

Open
chris-massie wants to merge 1 commit into
developfrom
uum-147719-change-before-render-timeout
Open

chris-massie wants to merge 1 commit into
developfrom
uum-147719-change-before-render-timeout

Conversation

@chris-massie

@chris-massie chris-massie commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

Description

This is a backport based on https://github.cds.internal.unity3d.com/unity/unity/pull/126600, see original PR for full context. The short version is that this fixes inconsistent timing of when timeouts (such as the Hold interaction) can fire when a before-render input device (e.g., XR HMD) is added or not, improving expected behavior by users.

Testing status & QA

Tested with the repro project the user submitted with the bug, along with some extra verification logging made to their script. I was no longer able to have the Hold interaction on their input action trigger during before-render, which was causing the user's polling during Update() to miss the interaction phase change.

I also added a new unit test that I verified failed before the change to fix/change this behavior. The test steps through the input update phases to make the Hold interaction duration threshold met during the before-render period and verify that the action waits to change to the Performed phase until the next frame.

Overall Product Risks

Please rate the potential complexity and halo effect from low to high for the reviewers. Note down potential risks to specific Editor branches if any.

  • Complexity: Low
  • Halo Effect: Low

Comments to reviewers

See:

Checklist

Before review:

  • Changelog entry added.
    • Explains the change in Changed, Fixed, Added sections.
    • For API change contains an example snippet and/or migration example.
    • JIRA ticket linked, example (case %%). If it is a private issue, just add the case ID without a link.
    • Jira port for the next release set as "Resolved".
  • Tests added/changed, if applicable.
    • Functional tests Area_CanDoX, Area_CanDoX_EvenIfYIsTheCase, Area_WhenIDoX_AndYHappens_ThisIsTheResult.
    • Performance tests.
    • Integration tests.
  • Docs for new/changed API's.
    • Xmldoc cross references are set correctly.
    • Added explanation how the API works.
    • Usage code examples added.
    • The manual is updated, if needed.

During merge:

  • Commit message for squash-merge is prefixed with one of the list:
    • NEW: ___.
    • FIX: ___.
    • DOCS: ___.
    • CHANGE: ___.
    • RELEASE: 1.1.0-preview.3.

@chris-massie chris-massie self-assigned this Sep 23, 2026
@chris-massie chris-massie added the bug Issues where existsing functionality misbehaves label Sep 23, 2026
@chris-massie chris-massie changed the title [Port] [UUM-147719] [Input System] Changed input action timeout to not trigger during before-render period FIX: [Port] [UUM-147719] [Input System] Changed input action timeout to not trigger during before-render period Sep 23, 2026

@u-pr u-pr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Harness Review

Ship it

The change consistently defers timeout dispatch during before-render updates across both event-processing branches. I also examined update-type semantics, generic monitor users, and test-state restoration.

Reviewed commit 8851880

🤖 Helpful? 👍/👎

@codecov-github-com

codecov-github-com Bot commented Sep 23, 2026

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

@@             Coverage Diff             @@
##           develop    #2486      +/-   ##
===========================================
+ Coverage    78.95%   78.97%   +0.01%     
===========================================
  Files          767      767              
  Lines       140914   141051     +137     
===========================================
+ Hits        111262   111393     +131     
- Misses       29652    29658       +6     
Flag Coverage Δ
inputsystem_MacOS_6000.0 5.30% <100.00%> (+<0.01%) ⬆️
inputsystem_MacOS_6000.0_project 77.52% <100.00%> (+0.03%) ⬆️
inputsystem_MacOS_6000.3 5.31% <100.00%> (+<0.01%) ⬆️
inputsystem_MacOS_6000.3_project 77.52% <100.00%> (+0.03%) ⬆️
inputsystem_MacOS_6000.6 5.29% <100.00%> (+<0.01%) ⬆️
inputsystem_MacOS_6000.6_project 77.58% <100.00%> (+0.03%) ⬆️
inputsystem_Ubuntu_6000.0 5.31% <100.00%> (+<0.01%) ⬆️
inputsystem_Ubuntu_6000.0_project 77.43% <100.00%> (+0.03%) ⬆️
inputsystem_Ubuntu_6000.3 5.31% <100.00%> (+<0.01%) ⬆️
inputsystem_Ubuntu_6000.3_project 77.43% <100.00%> (+0.03%) ⬆️
inputsystem_Ubuntu_6000.6 5.30% <100.00%> (+<0.01%) ⬆️
inputsystem_Ubuntu_6000.6_project 77.48% <100.00%> (+0.03%) ⬆️
inputsystem_Windows_6000.0 5.30% <100.00%> (+<0.01%) ⬆️
inputsystem_Windows_6000.0_project 77.64% <100.00%> (+0.02%) ⬆️
inputsystem_Windows_6000.3 5.31% <100.00%> (+<0.01%) ⬆️
inputsystem_Windows_6000.3_project 77.64% <100.00%> (+0.03%) ⬆️
inputsystem_Windows_6000.6 5.29% <100.00%> (+<0.01%) ⬆️
inputsystem_Windows_6000.6_project 77.70% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ests/InputSystem/CoreTests_Actions_Interactions.cs 100.00% <100.00%> (ø)
...System/Runtime/InputManager.LegacyFocusHandling.cs 95.04% <100.00%> (ø)
...ty.inputsystem/InputSystem/Runtime/InputManager.cs 89.15% <100.00%> (+0.14%) ⬆️

... and 3 files with indirect coverage changes

ℹ️ Need help interpreting these results?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issues where existsing functionality misbehaves

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants