diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index ba91f2b476..79df7f5490 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -10,7 +10,8 @@ however, it has to be formatted properly to pass verification tests. ## [Unreleased] - yyyy-mm-dd - +- Fixed an issue causing a number of errors to be displayed when using `InputTestFixture` in playmode tests with domain reloading disabled on playmode entry. [ISXB-1446](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1446) +- Fixed issue where user was not prompted to save changes when loading a second input actions asset into an already opened editor. [ISXB-1343](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1343) ## [1.14.0] - 2025-03-20 @@ -19,7 +20,6 @@ however, it has to be formatted properly to pass verification tests. - Fixed an issue where ButtonStates are not fully updated when switching SingleUnifiedPointer. [ISXB-1356](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1356) - Fixed errors when pasting composite parts into non-composites. [ISXB-757](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-757) - Fixed an issue where updating the InputSystem outside of the dynamic Update would lead to UI input and navigation events get lost. [ISXB-1313](https://issuetracker.unity3d.com/issues/ui-onclick-events-sometimes-do-not-trigger-when-manual-update-is-utilized-with-input-system) -- Fixed an issue causing a number of errors to be displayed when using `InputTestFixture` in playmode tests with domain reloading disabled on playmode entry [ISXB-1446](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1446) ### Changed - Changed enum value `Key.IMESelected` to obsolete which was not a real key. Please use the ButtonControl `imeSelected`. diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs index 2595192d24..0928f3c819 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs @@ -100,6 +100,28 @@ private static InputActionsEditorWindow OpenWindow(InputActionAsset asset, strin } var window = GetWindow(); + if (window.m_IsDirty) + { + var assetPath = AssetDatabase.GUIDToAssetPath(window.m_AssetGUID); + if (!string.IsNullOrEmpty(assetPath)) + { + // Prompt user with a dialog + var result = Dialog.InputActionAsset.ShowSaveChanges(assetPath); + switch (result) + { + case Dialog.Result.Save: + window.Save(isAutoSave: false); + break; + case Dialog.Result.Cancel: + return window; + case Dialog.Result.Discard: + break; + default: + throw new ArgumentOutOfRangeException(nameof(result)); + } + } + } + window.m_IsDirty = false; window.minSize = k_MinWindowSize; window.SetAsset(asset, actionToSelect, actionMapToSelect);