Skip to content

Conversation

@K-Tone
Copy link
Collaborator

@K-Tone K-Tone commented Nov 11, 2025

Description

Hereby we propose to remove support for the case where we run without the project-wide input actions feature via the corresponding compile-time define (UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS).

It was necessary back in the day for two main reasons:

  1. Feature development approach where we introduced new features under defines, allowing easy opt-in while hopefully reducing potential breakages in the old paths. Project-wide input actions has been there for a while so far, so we're confident we don't need to disable it for the stability reasons.
  2. We had a number of limitations in Unity 2021.x relating to UITK, so we literally couldn't have a fully-functional Input Actions Editor Window there. Because of that, we had a rule in manifest to unset UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS in case pre Unity 2022 was detected. Now that the minimum editor version has been bumped to 2022.3 LTS, the define is always on in fact.

In this PR, alongside a myriad of trivial changes where we remove the define set/check, we also removed the old imgui-based Input Actions Editor Window that we don't show any more via normal means. It's been possible to enable it using features, but we no longer want to have that variability. With it, we're cutting InputActionEditorToolbar. We would have loved to cut more imgui-related stuff, in particular InputActionPropertiesView but that proved to be impossible -- since it's still used in custom property drawers.

Testing status & QA

Local testing / compilation.

Overall Product Risks

  • Complexity: Low
  • Halo Effect: Low

Comments to reviewers

Needs to land after #2274

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.

After merge:

  • Create forward/backward port if needed. If you are blocked from creating a forward port now please add a task to ISX-1444.

@K-Tone K-Tone changed the title Anthony/project wide actions are always on CHANGE: Remove the UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS define that allowed to disable the project-wide input actions feature Nov 11, 2025
@K-Tone K-Tone changed the title CHANGE: Remove the UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS define that allowed to disable the project-wide input actions feature CHANGE: Disabling the project-wide input actions is no longer supported Nov 11, 2025
@K-Tone K-Tone force-pushed the anthony/project-wide-actions-are-always-on branch from c33d149 to cf2729d Compare November 11, 2025 16:18
@K-Tone K-Tone marked this pull request as ready for review November 11, 2025 16:21
@u-pr-agent
Copy link
Contributor

u-pr-agent bot commented Nov 11, 2025

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪

The PR is large and touches many files, but the changes are mostly mechanical removals of a compile-time define, making the review straightforward but time-consuming to verify completely.
🏅 Score: 95

This is a valuable cleanup PR that removes a legacy compile-time define, simplifying the codebase and removing an old IMGUI editor, with changes applied consistently across the project.
🧪 PR contains tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Editor Workflow Change

The logic for opening an input action asset has been simplified. It now always opens the UITK-based InputActionsEditorWindow, as the old IMGUI-based InputActionEditorWindow has been removed as part of this PR. This is a core part of the intended cleanup and should be confirmed as the desired behavior.

private static void OpenEditor(InputActionAsset asset)
{
    // Redirect to Project-settings Input Actions editor if this is the project-wide actions asset
    if (IsProjectWideActionsAsset(asset))
    {
        SettingsService.OpenProjectSettings(InputSettingsPath.kSettingsRootPath);
        return;
    }

    InputActionsEditorWindow.OpenEditor(asset);
}
Unconditional Test Execution

Numerous tests in this file and others were previously conditional on UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS. They now run unconditionally, often including setup code like InputSystem.actions?.Disable() to isolate the test from project-wide actions. This ensures tests cover the now-permanent feature configuration.

InputSystem.actions?.Disable(); // Prevent these actions appearing in the `InputActionTrace`
Feature Deprecation

The PR removes the ability to disable project-wide input actions. This is a significant change in supported configurations and is now documented in the changelog. This simplification of the feature set should be validated.

- Project-Wide Input Actions can no longer be disabled (removed the UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS define)
  • Update review

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

// Redirect to IMGUI editor
InputActionEditorWindow.OpenEditor(asset);
#endif
InputActionsEditorWindow.OpenEditor(asset);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: The call to InputActionsEditorWindow.OpenEditor(asset) unconditionally opens the UI Toolkit editor, ignoring the InputSystem.settings.useIMGUIEditorForAssets setting. This setting is still used in other parts of the codebase to allow using the IMGUI editor. The logic to choose the editor based on this setting should be restored to avoid breaking user configurations that rely on the IMGUI editor. [possible issue, importance: 8]

Suggested change
InputActionsEditorWindow.OpenEditor(asset);
if (!InputSystem.settings.useIMGUIEditorForAssets)
InputActionsEditorWindow.OpenEditor(asset);
else
InputActionEditorWindow.OpenEditor(asset);

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree that the useIMGUIEditorForAssets setting should not be used anymore and be marked deprecated?

@codecov-github-com
Copy link

codecov-github-com bot commented Nov 11, 2025

Codecov Report

Attention: Patch coverage is 8.69565% with 21 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...em/InputSystem/Actions/Composites/AxisComposite.cs 0.00% 2 Missing ⚠️
...InputSystem/Actions/Composites/Vector2Composite.cs 0.00% 2 Missing ⚠️
...InputSystem/Actions/Composites/Vector3Composite.cs 0.00% 2 Missing ⚠️
...nputSystem/Actions/Interactions/HoldInteraction.cs 0.00% 2 Missing ⚠️
...System/Actions/Interactions/MultiTapInteraction.cs 0.00% 2 Missing ⚠️
...putSystem/Actions/Interactions/PressInteraction.cs 0.00% 2 Missing ⚠️
...tSystem/Actions/Interactions/SlowTapInteraction.cs 0.00% 2 Missing ⚠️
...InputSystem/Actions/Interactions/TapInteraction.cs 0.00% 2 Missing ⚠️
...ystem/Controls/Processors/AxisDeadzoneProcessor.cs 0.00% 2 Missing ⚠️
...stem/Controls/Processors/StickDeadzoneProcessor.cs 0.00% 2 Missing ⚠️
... and 1 more
@@             Coverage Diff             @@
##           develop    #2277      +/-   ##
===========================================
+ Coverage    76.81%   76.83%   +0.02%     
===========================================
  Files          476      476              
  Lines        88726    88832     +106     
===========================================
+ Hits         68155    68257     +102     
- Misses       20571    20575       +4     
Flag Coverage Δ
inputsystem_MacOS_2022.3 5.53% <0.00%> (+0.13%) ⬆️
inputsystem_MacOS_2022.3_project 75.40% <0.00%> (+0.70%) ⬆️
inputsystem_MacOS_6000.0 5.31% <0.00%> (+0.13%) ⬆️
inputsystem_MacOS_6000.0_project 77.32% <8.69%> (+0.72%) ⬆️
inputsystem_MacOS_6000.2 5.31% <0.00%> (+0.13%) ⬆️
inputsystem_MacOS_6000.2_project 77.32% <8.69%> (+0.72%) ⬆️
inputsystem_MacOS_6000.3 5.31% <0.00%> (+0.13%) ⬆️
inputsystem_MacOS_6000.3_project 77.32% <8.69%> (+0.71%) ⬆️
inputsystem_MacOS_6000.4 5.32% <0.00%> (+0.13%) ⬆️
inputsystem_MacOS_6000.4_project 77.33% <8.69%> (+0.72%) ⬆️
inputsystem_MacOS_6000.5 5.32% <0.00%> (+0.13%) ⬆️
inputsystem_MacOS_6000.5_project 77.33% <8.69%> (+0.72%) ⬆️
inputsystem_Ubuntu_2022.3 5.53% <0.00%> (+0.13%) ⬆️
inputsystem_Ubuntu_2022.3_project 75.19% <0.00%> (+0.70%) ⬆️
inputsystem_Ubuntu_6000.0 5.31% <0.00%> (+0.13%) ⬆️
inputsystem_Ubuntu_6000.0_project 77.12% <8.69%> (+0.72%) ⬆️
inputsystem_Ubuntu_6000.2 5.31% <0.00%> (+0.13%) ⬆️
inputsystem_Ubuntu_6000.2_project 77.12% <8.69%> (+0.72%) ⬆️
inputsystem_Ubuntu_6000.3 5.32% <0.00%> (+0.13%) ⬆️
inputsystem_Ubuntu_6000.3_project 77.13% <8.69%> (+0.72%) ⬆️
inputsystem_Ubuntu_6000.4 5.32% <0.00%> (+0.13%) ⬆️
inputsystem_Ubuntu_6000.4_project 77.14% <8.69%> (+0.72%) ⬆️
inputsystem_Ubuntu_6000.5 5.32% <0.00%> (+0.13%) ⬆️
inputsystem_Ubuntu_6000.5_project 77.14% <8.69%> (+0.72%) ⬆️
inputsystem_Windows_2022.3 5.53% <0.00%> (+0.13%) ⬆️
inputsystem_Windows_2022.3_project 75.53% <0.00%> (+0.71%) ⬆️
inputsystem_Windows_6000.0 5.31% <0.00%> (+0.13%) ⬆️
inputsystem_Windows_6000.0_project 77.45% <8.69%> (+0.72%) ⬆️
inputsystem_Windows_6000.2 5.31% <0.00%> (+0.13%) ⬆️
inputsystem_Windows_6000.2_project 77.45% <8.69%> (+0.72%) ⬆️
inputsystem_Windows_6000.3 5.31% <0.00%> (+0.13%) ⬆️
inputsystem_Windows_6000.3_project 77.45% <8.69%> (+0.72%) ⬆️
inputsystem_Windows_6000.4 5.32% <0.00%> (+0.13%) ⬆️
inputsystem_Windows_6000.4_project 77.45% <8.69%> (+0.72%) ⬆️
inputsystem_Windows_6000.5 5.32% <0.00%> (+0.13%) ⬆️
inputsystem_Windows_6000.5_project 77.45% <8.69%> (+0.72%) ⬆️

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

Files with missing lines Coverage Δ
...sts/InputSystem.Editor/ControlSchemeEditorTests.cs 100.00% <ø> (ø)
...ests/InputSystem.Editor/CustomProcessorEnumTest.cs 89.65% <ø> (ø)
...r/InputActionReferencePropertyDrawerEditorTests.cs 100.00% <ø> (ø)
...ests/InputSystem.Editor/InputActionsEditorTests.cs 100.00% <ø> (ø)
...ystem.Editor/ProjectWideInputActionsEditorTests.cs 93.51% <ø> (ø)
Assets/Tests/InputSystem.Editor/SelectorsTests.cs 100.00% <ø> (ø)
Assets/Tests/InputSystem.Editor/TestData.cs 97.56% <ø> (ø)
...ets/Tests/InputSystem.Editor/TestDataGenerators.cs 100.00% <ø> (ø)
...ests/InputSystem.Editor/UIToolkitBaseTestWindow.cs 97.43% <ø> (ø)
Assets/Tests/InputSystem/CorePerformanceTests.cs 0.00% <ø> (ø)
... and 67 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@josepmariapujol-unity josepmariapujol-unity left a comment

Choose a reason for hiding this comment

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

LGTM! Approved

Copy link
Collaborator

@ekcoh ekcoh left a comment

Choose a reason for hiding this comment

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

Great to see this clean-up happening. Could approve already now but want to sort out why we cannot at least deprecate and stop using the imgui setting?

// Redirect to IMGUI editor
InputActionEditorWindow.OpenEditor(asset);
#endif
InputActionsEditorWindow.OpenEditor(asset);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree that the useIMGUIEditorForAssets setting should not be used anymore and be marked deprecated?

Copy link
Collaborator

@jfreire-unity jfreire-unity left a comment

Choose a reason for hiding this comment

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

Thanks for doing this. Great to do some house cleaning! I share the sentiment of removing old IMGUI inspector code. Maybe we could also figure out how many inspectors there are and plan work to remove them in 6.7?

My only nitpick is to the PR title, because I got confused at first.
We're actually only removing the conditional compilation for the project-wide actions feature AND removing unused IMGUI code.
But changing it to to "Remove project-wide input action feature conditional compilation" or "Project-wide input actions feature is always compiled" would be slightly better, but it's just an opinion.

@K-Tone K-Tone changed the title CHANGE: Disabling the project-wide input actions is no longer supported CHANGE: Remove the UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS compile-time define Nov 13, 2025
@K-Tone
Copy link
Collaborator Author

K-Tone commented Nov 13, 2025

CC @Pauliusd01, here is a PR where we remove some more defines. Do you want to be added as a reviewer, or is it fine to just have you mentioned for viz?

@K-Tone
Copy link
Collaborator Author

K-Tone commented Nov 13, 2025

Going back to removing InputSystem.settings.useIMGUIEditorForAssets, all the spots I checked actually have a UITK path that is currently enabled by default.

image

Check out this image, it's typical. There are 14 files like that. I'd propose this:

  • After landing this PR, open a new one specifically for useIMGUIEditorForAssets removal
  • Mark useIMGUIEditorForAssets deprecated, make it do nothing; I guess being public, we can't remove it now
  • For all spots like on the screenshot above, we remove the OnGUI function from all of those classes (if possible) - because it doesn't do anything except checking for useIMGUIEditorForAssets
  • Where we have GUIContent, split it into strings - text & tooltip so that we don't depend on imgui concepts any more

How does that sound @ekcoh @jfreire-unity ?

@Pauliusd01 Pauliusd01 self-requested a review November 14, 2025 06:41
Copy link
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.

LGTM, tested:

  • Input binding controls in the inspector
  • Input Actions window and ProjectWideActions window functionality, saving, controls, focus, etc
  • Upgrading from 1.7 Input system to this PR

@jfreire-unity
Copy link
Collaborator

jfreire-unity commented Nov 14, 2025

  • After landing this PR, open a new one specifically for useIMGUIEditorForAssets removal
  • Mark useIMGUIEditorForAssets deprecated, make it do nothing; I guess being public, we can't remove it now
  • For all spots like on the screenshot above, we remove the OnGUI function from all of those classes (if possible) - because it doesn't do anything except checking for useIMGUIEditorForAssets
  • Where we have GUIContent, split it into strings - text & tooltip so that we don't depend on imgui concepts any more

How does that sound @ekcoh @jfreire-unity ?

Sounds like a good plan to me 👍

@K-Tone
Copy link
Collaborator Author

K-Tone commented Nov 14, 2025

Failures overview:

InputSystem-MobileFunctionalTests - 6000.5 - IOS

This is a known problem that is unrelated to this branch, Wind is working on it at the moment.

Test Sample Projects trunk

It's caused by a surprising instability that is a compilation issue caused by some Timeline script upgrader shenanigans. Do we even depend on timeline though?

Library/PackageCache/com.unity.timeline@6b9e48457ddb/Editor/TimelineHelpers.cs(31,20): error CS0234: The type or namespace name 'GUID' does not exist in the namespace 'UnityEditor' (are you missing an assembly reference?)

Nothing of that is related to my changes so I'm going to force-merge now.

@K-Tone K-Tone merged commit d78b238 into develop Nov 14, 2025
124 of 127 checks passed
@K-Tone K-Tone deleted the anthony/project-wide-actions-are-always-on branch November 14, 2025 11:30
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.

6 participants