Skip to content

CHANGE: Update asset InputSystem.inputsettings to use UI Toolkit framework#2393

Open
josepmariapujol-unity wants to merge 8 commits intodevelopfrom
input/uitoolkit-input-asset
Open

CHANGE: Update asset InputSystem.inputsettings to use UI Toolkit framework#2393
josepmariapujol-unity wants to merge 8 commits intodevelopfrom
input/uitoolkit-input-asset

Conversation

@josepmariapujol-unity
Copy link
Copy Markdown
Collaborator

@josepmariapujol-unity josepmariapujol-unity commented Mar 21, 2026

Description

This PR is updating the UI for asset InputSystem.inputsettings to use UI Toolkit framework.

Before:
IMGUI

After:
UITOOLKIT

Testing status & QA

Once you create an input settings check the asset and click the button, see video.

Screen.Recording.2026-03-23.at.12.58.07.mov

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: 1
  • Halo Effect: 1

Comments to reviewers

Please describe any additional information such as what to focus on, or historical info for the reviewers.

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.

@josepmariapujol-unity josepmariapujol-unity self-assigned this Mar 23, 2026
@josepmariapujol-unity josepmariapujol-unity changed the title Updating to UITOOLKIT input asset editor CHANGE: Update asset InputSystem.inputsettings to use UI Toolkit framework Mar 23, 2026
@josepmariapujol-unity josepmariapujol-unity marked this pull request as ready for review March 26, 2026 10:56
Copy link
Copy Markdown
Contributor

@u-pr u-pr bot left a comment

Choose a reason for hiding this comment

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

May require changes

The transition to UI Toolkit introduces some reactivity issues where the UI remains stale after user actions or external state changes. There are also minor unused parameters and documentation inconsistencies.

🤖 Helpful? 👍/👎

@codecov-github-com
Copy link
Copy Markdown

codecov-github-com bot commented Mar 26, 2026

Codecov Report

Attention: Patch coverage is 0% with 14 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...system/InputSystem/Editor/InputAssetEditorUtils.cs 0.00% 8 Missing ⚠️
...putSystem/Editor/Settings/InputSettingsProvider.cs 0.00% 6 Missing ⚠️
@@             Coverage Diff             @@
##           develop    #2393      +/-   ##
===========================================
+ Coverage    77.92%   78.09%   +0.17%     
===========================================
  Files          482      483       +1     
  Lines        97755    98760    +1005     
===========================================
+ Hits         76175    77130     +955     
- Misses       21580    21630      +50     
Flag Coverage Δ
inputsystem_MacOS_2022.3 5.34% <0.00%> (-0.22%) ⬇️
inputsystem_MacOS_2022.3_project 75.29% <0.00%> (-0.07%) ⬇️
inputsystem_MacOS_6000.0 5.31% <0.00%> (-0.03%) ⬇️
inputsystem_MacOS_6000.0_project 77.19% <0.00%> (-0.08%) ⬇️
inputsystem_MacOS_6000.3 5.31% <0.00%> (-0.03%) ⬇️
inputsystem_MacOS_6000.3_project 77.19% <0.00%> (-0.07%) ⬇️
inputsystem_MacOS_6000.4 5.32% <0.00%> (-0.03%) ⬇️
inputsystem_MacOS_6000.4_project 77.20% <0.00%> (-0.08%) ⬇️
inputsystem_MacOS_6000.5 5.30% <0.00%> (-0.04%) ⬇️
inputsystem_MacOS_6000.5_project 77.23% <0.00%> (-0.05%) ⬇️
inputsystem_MacOS_6000.6 5.30% <0.00%> (-0.04%) ⬇️
inputsystem_MacOS_6000.6_project 77.23% <0.00%> (-0.05%) ⬇️
inputsystem_Ubuntu_2022.3_project 75.19% <0.00%> (+0.03%) ⬆️
inputsystem_Ubuntu_6000.0 5.31% <0.00%> (-0.03%) ⬇️
inputsystem_Ubuntu_6000.0_project 77.10% <0.00%> (+0.03%) ⬆️
inputsystem_Ubuntu_6000.3 5.31% <0.00%> (-0.03%) ⬇️
inputsystem_Ubuntu_6000.3_project 77.09% <0.00%> (+0.02%) ⬆️
inputsystem_Ubuntu_6000.4 5.32% <0.00%> (-0.03%) ⬇️
inputsystem_Ubuntu_6000.4_project 77.10% <0.00%> (+0.02%) ⬆️
inputsystem_Ubuntu_6000.5 5.31% <0.00%> (-0.04%) ⬇️
inputsystem_Ubuntu_6000.5_project 77.14% <0.00%> (+0.05%) ⬆️
inputsystem_Ubuntu_6000.6 5.31% <0.00%> (-0.04%) ⬇️
inputsystem_Ubuntu_6000.6_project 77.14% <0.00%> (+0.05%) ⬆️
inputsystem_Windows_2022.3 5.34% <0.00%> (-0.22%) ⬇️
inputsystem_Windows_2022.3_project 75.42% <0.00%> (-0.07%) ⬇️
inputsystem_Windows_6000.0 5.31% <0.00%> (-0.03%) ⬇️
inputsystem_Windows_6000.0_project 77.33% <0.00%> (-0.06%) ⬇️
inputsystem_Windows_6000.3 5.31% <0.00%> (-0.03%) ⬇️
inputsystem_Windows_6000.3_project 77.32% <0.00%> (-0.07%) ⬇️
inputsystem_Windows_6000.4 5.32% <0.00%> (-0.03%) ⬇️
inputsystem_Windows_6000.4_project 77.33% <0.00%> (-0.07%) ⬇️
inputsystem_Windows_6000.5 5.30% <0.00%> (-0.04%) ⬇️
inputsystem_Windows_6000.5_project 77.36% <0.00%> (-0.03%) ⬇️
inputsystem_Windows_6000.6 5.30% <0.00%> (-0.04%) ⬇️
inputsystem_Windows_6000.6_project 77.36% <0.00%> (-0.03%) ⬇️

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

Files with missing lines Coverage Δ
...putSystem/Editor/Settings/InputSettingsProvider.cs 1.35% <0.00%> (-0.27%) ⬇️
...system/InputSystem/Editor/InputAssetEditorUtils.cs 0.00% <0.00%> (ø)

... and 6 files with indirect coverage changes

ℹ️ Need help interpreting these results?

@Pauliusd01
Copy link
Copy Markdown
Collaborator

/test_plan

@u-pr
Copy link
Copy Markdown
Contributor

u-pr bot commented Mar 30, 2026

Test Plan

  • Test plan approved by PR author
  • Test execution in progress
  • Test execution complete
  • Ready for merge

Summary of Changes & Risk Assessment

Summary of Changes

This PR migrates the inspector UI for InputSettings assets from IMGUI to UI Toolkit. It refactors the shared utility InputAssetEditorUtils.DrawMakeActiveGui into a UI Toolkit version CreateMakeActiveGui and updates InputSettingsEditor to use CreateInspectorGUI.

Risk Assessment

  • High Risk Areas: None identified.
  • Medium Risk Areas: UI consistency and interaction logic for assigning the active settings asset.
  • Low Risk Areas: Visual layout, button functionality for opening the settings window.

Test Scenarios

Functional Testing

  • Verify "Active" State: Select the InputSettings asset that is currently assigned in Project Settings > Input System Package. Verify that the inspector shows an Info HelpBox with the text "These actions are assigned as the settings." and no assignment button.
  • Verify "Inactive" State: Select or create a second InputSettings asset that is NOT currently active. Verify the inspector shows:
    • A Warning HelpBox stating "These actions are not assigned as the settings...".
    • A button labeled "Assign as the settings".
  • Verify Assignment Logic: In the "Inactive" state, click the "Assign as the settings" button. Verify that the asset becomes the active settings in the project and the UI immediately refreshes to the "Active" state (Info box).
  • Verify Settings Window Link: Click the "Open Input Settings Window" button. Verify it correctly opens the Project Settings > Input System Package window.

Regression Testing

  • Visual Layout Check: Compare the new UI Toolkit inspector against the previous IMGUI version (see PR screenshots). Ensure the button height (30px) and HelpBox styles are consistent with Unity Editor standards.
  • Null Settings Check: Delete the active settings asset or set InputSystem.settings to null via script. Verify the inspector for a settings asset handles the null state gracefully (showing the warning box without crashing).

Edge Cases

  • Asset Renaming: Rename the InputSettings asset while the inspector is open. Verify that the path/name displayed in the Warning HelpBox (if inactive) remains accurate or handles the change without internal errors.
  • Multiple Inspectors: Open two Inspector tabs, one for an active asset and one for an inactive asset. Verify that clicking "Assign" in one correctly updates the UI state in both tabs.

💡 This test plan updates automatically when /test_plan is run on new commits. If you have any feedback, please reach out in #ai-qa


🤖 Helpful? Please react with 👍/👎 | Questions❓Please reach out in Slack #ask-u-pr

@Pauliusd01
Copy link
Copy Markdown
Collaborator

Text can go outside the button when scaled
https://github.com/user-attachments/assets/cbd35390-7555-4554-ab3d-c9aefe797d6e

Copy link
Copy Markdown
Collaborator

@Pauliusd01 Pauliusd01 left a comment

Choose a reason for hiding this comment

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

Text/button isn't updated correctly when multiple inspectors are used
https://github.com/user-attachments/assets/a9e54976-0525-4cd6-9094-c3b6c8fcc030

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants