From 8e1d2f3e965e665dc46aac945a9688d723b88aff Mon Sep 17 00:00:00 2001 From: Paulius Dervinis Date: Wed, 5 Aug 2026 12:46:30 +0300 Subject: [PATCH 1/2] FIX: Input Actions editor window throws a "Failed to load asset" exception on startup when its layout is restored in a different project [UUM-144318] The Input Actions editor window persisted its target asset's GUID in the editor window layout, which is shared across projects, so a restore in a project where that GUID resolved to no asset logged an exception on startup. In InputActionsEditorWindow.CreateGUI(), the layout-restore branch loaded the asset from the persisted GUID and threw an Exception when the load returned null, which the surrounding catch surfaced via Debug.LogException before closing the window. The asset == null branch now closes the window quietly instead of throwing. The close is deferred via EditorApplication.delayCall because CreateGUI runs inside the UITK repaint; closing synchronously there tears down the window's panel mid-repaint and produces a follow-up NullReferenceException. No working copy exists to clean up at that point. Jira: https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-144318 --- Packages/com.unity.inputsystem/CHANGELOG.md | 1 + .../Editor/UITKAssetEditor/InputActionsEditorWindow.cs | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index daa76888d1..65e57ed020 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 the Input Actions editor window logging a "Failed to load asset" exception on editor startup when its saved window layout was restored in a project where the referenced asset GUID did not resolve; the window now closes quietly instead [UUM-144318](https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-144318) - Empty foldouts are no longer shown for processors and interactions that have no settings (e.g. "Invert") [UUM-144325](https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-144325) - Fixed the Input Actions editor toolbar buttons being clipped when the Action Properties panel grew tall enough to show a scrollbar - Fixed the Control Schemes dropdown in the Input Actions editor continuing to display a deleted scheme's name after the last control scheme was removed, instead of resetting to "No Control Schemes" until the asset was saved or the editor reopened. [UUM-141563](https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-141563) diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs index a60b84d1b5..8af5c57da3 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs @@ -208,7 +208,14 @@ private void CreateGUI() // Only domain reload var asset = AssetDatabase.LoadAssetAtPath(assetPath); if (asset == null) - throw new Exception($"Failed to load asset \"{assetPath}\". The file may have been deleted or moved."); + { + // The persisted asset GUID can resolve to no asset when the window layout is + // restored in a different project. Close quietly instead of throwing, but defer + // the close: calling Close() synchronously here tears down the window's panel + // while CreateGUI runs inside the UITK repaint, which then null-refs on repaint. + EditorApplication.delayCall += Close; + return; + } m_AssetJson = InputActionsEditorWindowUtils.ToJsonWithoutName(asset); From b84a6c3b15f2820429e411a913c3b007f01adbb0 Mon Sep 17 00:00:00 2001 From: Paulius Dervinis Date: Wed, 5 Aug 2026 13:48:24 +0300 Subject: [PATCH 2/2] Update comment --- .../Editor/UITKAssetEditor/InputActionsEditorWindow.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs index 8af5c57da3..1b32b421f9 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs @@ -209,10 +209,8 @@ private void CreateGUI() // Only domain reload if (asset == null) { - // The persisted asset GUID can resolve to no asset when the window layout is - // restored in a different project. Close quietly instead of throwing, but defer - // the close: calling Close() synchronously here tears down the window's panel - // while CreateGUI runs inside the UITK repaint, which then null-refs on repaint. + // Can happen when an asset is deleted while the window is open. + // Delay the closure to avoid null-refs on repaint. EditorApplication.delayCall += Close; return; }