diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index 71a26a51d7..1eb06e2eca 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -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) diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorSettingsProvider.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorSettingsProvider.cs index e27c12cc6f..87c7dcd2f9 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorSettingsProvider.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorSettingsProvider.cs @@ -178,7 +178,7 @@ private void ValidateAndSaveAsset(InputActionAsset asset) // 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()) { return; } diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs index 9a6ec57263..bbab29e2d0 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs @@ -258,10 +258,28 @@ private void BuildUI() rootVisualElement.Clear(); if (!rootVisualElement.styleSheets.Contains(InputActionsEditorWindowUtils.theme)) rootVisualElement.styleSheets.Add(InputActionsEditorWindowUtils.theme); + + if (IsProjectSettingsWindowInputAsset()) + { + var helpBox = new HelpBox( + "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); + } + 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); + } + private void OnStateChanged(InputActionsEditorState newState, UIRebuildMode editorRebuildMode) { DirtyInputActionsEditorWindow(newState);