Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ static EnableUITKEditor()
internal class InputActionsEditorWindow : EditorWindow
{
private static readonly string k_FileExtension = "." + InputActionAsset.Extension;
/// <summary>
/// Controls whether the UITK version of the InputActionAsset Editor is enabled or not for editing Input Action
/// assets.
/// </summary>
/// 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;
Expand All @@ -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);
Expand Down