FIX: Avoid disabling project-wide actions on shutdown#2346
FIX: Avoid disabling project-wide actions on shutdown#2346AswinRajGopal wants to merge 18 commits into
Conversation
PR Reviewer Guide 🔍(Review updated until commit 15e20a1)Here are some key observations to aid the review process:
🤖 Helpful? Please react with 👍/👎 | Questions❓Please reach out in Slack #ask-u-pr |
PR Code Suggestions ✨Explore these optional code suggestions:
🤖 Helpful? Please react with 👍/👎 | Questions❓Please reach out in Slack #ask-u-pr |
|||||||||
Codecov ReportAll modified and coverable lines are covered by tests ✅ @@ Coverage Diff @@
## develop #2346 +/- ##
===========================================
+ Coverage 78.13% 78.83% +0.70%
===========================================
Files 483 760 +277
Lines 98770 138592 +39822
===========================================
+ Hits 77169 109257 +32088
- Misses 21601 29335 +7734 Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
/test_plan |
Test Plan
Summary of Changes & Risk AssessmentSummary of ChangesThis PR fixes a bug where the Risk Assessment
Test ScenariosFunctional Testing
Regression Testing
🔍 Regression Deep Dive (additional risks identified)
Edge Cases
💡 This test plan updates automatically when 🤖 Helpful? Please react with 👍/👎 | Questions❓Please reach out in Slack #ask-u-pr |
Hi @Pauliusd01 |
|
Sorry I'll try to have a look at this in the next couple of days. Need to "load the context" of this area to make sure we're not introducing any other regression |
|
/crc |
There was a problem hiding this comment.
The review has identified several significant issues that need to be addressed. The current implementation introduces a regression risk with a potential ArgumentException when custom assets are used. Additionally, there is a logic discrepancy in the fix itself that results in disabling portions of the project-wide action asset, which will likely cause the newly added test case to fail. Some minor improvements to test code consistency and maintenance are also recommended.
🤖 Helpful? 👍/👎
Hi @jfreire-unity could you please review this PR? or can you suggest another reviewers from the team to move it forward? it is been a while on my name. Thanks in advance :) |
jfreire-unity
left a comment
There was a problem hiding this comment.
As mentioned in Slack, have a look at the U-PR suggestions to see if they make any sense. And feel free to look if we need to extend the added test to look into the action map that's being disabled.
|
Currently working on U-PR comments, |
|
Persistent review updated to latest commit 0771421 |
PR Code Suggestions ✨No code suggestions found for the PR. |
|
@AswinRajGopal It seems unclear whether the third u-pr feedback comment has been resolved? It has been marked resolved without a comment, but seems referenced code has not changed (as it have for the other 3). I would suggest adding a comment on that u-pr comment why it's not valid or not addressed or whether is incorrect. Then I would update the u-pr review to get a new review round based on current commits. |
|
Persistent review updated to latest commit 0acc808 |
|
FYI I am only free from next week |
…map enablement tracking
…own). For project-wide actions the play-mode lifecycle owns the asset, so the provider enables the UI map on init but leaves it as-is when shutting down.
|
Persistent review updated to latest commit 2b5eadf |
|
Persistent review updated to latest commit 15e20a1 |
|
/crc |
|
/ci prv |

Description
case: https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-134130
Bug:
UI Toolkit now destroys its internal objects when there is no UI left in the scene, so InputSystemProvider.Shutdown() can run during play. During shutdown we unregister the UI actions, but the old code was
managing the whole action asset. With project-wide actions (InputSystem.actions), that meant we could affect input outside UI. With the default internal asset, not cleaning up at all could leave the UI map
enabled longer than intended.
Fix:
Scope the lifecycle to the UI action map only. On registration, InputSystemProvider now makes sure the UI map is enabled. On unregister/shutdown, it disables only that UI map, and only if this provider
enabled it. This avoids changing the enabled state of unrelated maps in InputSystem.actions while still cleaning up the default/internal UI actions correctly.
Testing status & QA
Added new test.
Verified manually using repro project.
Overall Product Risks
Comments to reviewers
Checklist
Before review:
Changed,Fixed,Addedsections.Area_CanDoX,Area_CanDoX_EvenIfYIsTheCase,Area_WhenIDoX_AndYHappens_ThisIsTheResult.During merge:
NEW: ___.FIX: ___.DOCS: ___.CHANGE: ___.RELEASE: 1.1.0-preview.3.