Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
355f77c
Implementing Save button in input system settings
josepmariapujol-unity Feb 26, 2026
826e5a2
Update InputActionsEditorView.cs
josepmariapujol-unity Feb 26, 2026
49d95ac
Update InputActionsEditorView.cs
josepmariapujol-unity Feb 26, 2026
2fc1958
Using Save() method both InputActionsEditorSettingsProvider.cs & Inpu…
josepmariapujol-unity Feb 26, 2026
e9b0e08
Add asset verification before saving input actions
josepmariapujol-unity Feb 26, 2026
e3a124c
Fix saving InputSystem actions in ProjectSettings
josepmariapujol-unity Mar 3, 2026
61ef1ef
Remove XML comments from Save method
josepmariapujol-unity Mar 3, 2026
65f1767
Refactor Save method position in InputActionsEditorWindow
josepmariapujol-unity Mar 3, 2026
7e2617c
Merge branch 'develop' into input/save-asset-input-system
josepmariapujol-unity Mar 3, 2026
80b37e3
Adding a conditional when projectSettingsWindowIsOpen is NOT open
josepmariapujol-unity Mar 3, 2026
f5eea5f
Reverting commit changes
josepmariapujol-unity Mar 3, 2026
598835e
Update InputActionsEditorWindow.cs
josepmariapujol-unity Mar 3, 2026
7c08c13
Update InputActionsEditorWindow.cs
josepmariapujol-unity Mar 3, 2026
92fb34b
Refactor condition in InputActionsEditorSettingsProvider
josepmariapujol-unity Mar 4, 2026
1359613
Remove unused variable in InputActionsEditorSettingsProvider
josepmariapujol-unity Mar 4, 2026
5c2eab5
Update CHANGELOG.md
josepmariapujol-unity Mar 4, 2026
16ff070
Add helpbox to asset assigned as the Project-wide Input Actions
josepmariapujol-unity Mar 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Packages/com.unity.inputsystem/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Fixed

- Fixed auto-save not working for Input System actions in Project Settings when both the Project Settings and Input System Actions windows were open [UUM-134035](https://jira.unity3d.com/browse/UUM-134035)
- Improved New Input System warning dialog, Native Device Inputs Not Enabled [UUM-132151].
- Fixed caching for InputControlPath display name [ISX-2501](https://jira.unity3d.com/browse/ISX-2501)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
// This code should be cleaned up once we migrate the InputControl stuff from ImGUI completely.
// Since at that point it stops being a separate window that steals focus.
// (See case ISXB-1713)
if (!InputEditorUserSettings.autoSaveInputActionAssets || m_View.IsControlSchemeViewActive())
if (m_View.IsControlSchemeViewActive())

Check warning on line 181 in Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorSettingsProvider.cs

View check run for this annotation

Codecov GitHub.com / codecov/patch

Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorSettingsProvider.cs#L181

Added line #L181 was not covered by tests
Copy link
Collaborator

Choose a reason for hiding this comment

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

Double checking my understanding of the repo, so currently tested scenario is:

  1. Open Project settings > Input System project wide input actions window (PWIA)
  2. Open the InputActionAsset used in PWIA
  3. Add new ActionMap to the PWIA window
  4. Exit PWIA focus
    Expected: InputActionAsset reflect the change from the PWIA auto save.

What would happen given the opposite scenario?

  1. Open Project settings > Input System project wide input actions window (PWIA)
  2. Open the InputActionAsset used in PWIA
  3. Disable auto save in the InputActionAsset window
  4. Add new ActionMap to the InputAction window
  5. Without saving, focus PWIA window. (Alt: make a small change (add a control to an existing input action))
  6. Focus back InputAction window

Expected: I assume that this should do nothing as the instance of PWIA is not dirty and skip auto save, but might be worth a quick try.

Alt Expected:
My assumption is that the PWIA is now auto saving and gaining priority over any unsaved work you do in the other window. This sounds like expected behaviour, but:

  • could that count as a regression for some users?
  • should we update documentation to reflect the expected behaviour?
  • should InputActionAsset used in PWIA be readonly? (with maybe a helpbox to align with PlayerInput behaviour?)
Image

{
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,28 @@
rootVisualElement.Clear();
if (!rootVisualElement.styleSheets.Contains(InputActionsEditorWindowUtils.theme))
rootVisualElement.styleSheets.Add(InputActionsEditorWindowUtils.theme);

if (IsProjectSettingsWindowInputAsset())
{
var helpBox = new HelpBox(

Check warning on line 264 in Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs

View check run for this annotation

Codecov GitHub.com / codecov/patch

Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs#L263-L264

Added lines #L263 - L264 were not covered by tests
"This asset is assigned as the Project-wide Input Actions in Project Settings. Changes here affect input for the entire project.",
HelpBoxMessageType.Info);
rootVisualElement.Add(helpBox);
}

Check warning on line 268 in Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs

View check run for this annotation

Codecov GitHub.com / codecov/patch

Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs#L267-L268

Added lines #L267 - L268 were not covered by tests

m_View = new InputActionsEditorView(rootVisualElement, m_StateContainer, false, () => Save(isAutoSave: false));
m_StateContainer.Initialize(rootVisualElement.Q("action-editor"));
}

private bool IsProjectSettingsWindowInputAsset()
{
var projectWideActions = InputSystem.actions;
if (projectWideActions == null)
return false;
var path = AssetDatabase.GUIDToAssetPath(m_AssetGUID);
return path == AssetDatabase.GetAssetPath(projectWideActions);

Check warning on line 280 in Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs

View check run for this annotation

Codecov GitHub.com / codecov/patch

Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs#L279-L280

Added lines #L279 - L280 were not covered by tests
}

private void OnStateChanged(InputActionsEditorState newState, UIRebuildMode editorRebuildMode)
{
DirtyInputActionsEditorWindow(newState);
Expand Down