diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/AssetEditor/InputActionEditorWindow.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/AssetEditor/InputActionEditorWindow.cs index 068c5c1138..09ac63ad88 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/AssetEditor/InputActionEditorWindow.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/AssetEditor/InputActionEditorWindow.cs @@ -38,10 +38,9 @@ internal class InputActionEditorWindow : EditorWindow, IDisposable public static bool OnOpenAsset(int instanceId, int line) { #if UNITY_INPUT_SYSTEM_UI_TK_ASSET_EDITOR - if (InputSystem.settings.IsFeatureEnabled(InputFeatureNames.kUseUIToolkitEditor)) + if (InputSystem.settings.IsFeatureEnabled(InputFeatureNames.kUseUIToolkitEditor) && InputActionsEditorWindow.isWindowEnabled) return false; #endif - var path = AssetDatabase.GetAssetPath(instanceId); if (!path.EndsWith(k_FileExtension, StringComparison.InvariantCultureIgnoreCase)) return false; diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs index ef2f08cfd6..8e7351c3a9 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs @@ -24,6 +24,13 @@ static EnableUITKEditor() internal class InputActionsEditorWindow : EditorWindow { private static readonly string k_FileExtension = "." + InputActionAsset.Extension; + /// + /// Controls whether the UITK version of the InputActionAsset Editor is enabled or not for editing Input Action + /// assets. + /// + /// At the moment, the UITK Asset Editor doesn't have feature parity with the IMGUI version. + /// This is set to false to show the IMGUI version of the InputActionAsset Editor instead. + internal static bool isWindowEnabled = false; private int m_AssetId; private string m_AssetPath; private string m_AssetJson; @@ -32,7 +39,7 @@ internal class InputActionsEditorWindow : EditorWindow [OnOpenAsset] public static bool OpenAsset(int instanceId, int line) { - if (!InputSystem.settings.IsFeatureEnabled(InputFeatureNames.kUseUIToolkitEditor)) + if (!InputSystem.settings.IsFeatureEnabled(InputFeatureNames.kUseUIToolkitEditor) || !isWindowEnabled) return false; var path = AssetDatabase.GetAssetPath(instanceId);