diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index 2a36143974..409e7211bc 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -34,6 +34,7 @@ however, it has to be formatted properly to pass verification tests. - Fixed an issue with default device selection when adding new Control Scheme. - Fixed an issue where action map delegates were not updated when the asset already assigned to the PlayerInput component were changed [ISXB-711](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-711). - Fixed Action properties edition in the UI Toolkit version of the Input Actions Asset editor. [ISXB-1277](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1277) +- Fixed Cut Mode for Action Maps and Actions to make renaming disabled. [ISXB-1155](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1155) ### Changed - Added back the InputManager to InputSystem project-wide asset migration code with performance improvement (ISX-2086). diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/ActionMapsView.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/ActionMapsView.cs index 2659eaabe1..7665970d7e 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/ActionMapsView.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/ActionMapsView.cs @@ -32,6 +32,7 @@ public ActionMapsView(VisualElement root, StateContainer stateContainer) treeViewItem.EditTextFinished += treeViewItem.EditTextFinishedCallback; treeViewItem.userData = i; element.SetEnabled(!mapData.isDisabled); + treeViewItem.isDisabledActionMap = mapData.isDisabled; ContextMenu.GetContextMenuForActionMapItem(this, treeViewItem, i); }; diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/ActionsTreeView.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/ActionsTreeView.cs index a0b6029a9b..4fd20e9b0b 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/ActionsTreeView.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/ActionsTreeView.cs @@ -94,6 +94,7 @@ public ActionsTreeView(VisualElement root, StateContainer stateContainer) EditorInputControlLayoutCache.GetIconForLayout("Control")); e.SetEnabled(!item.isCut); + treeViewItem.isCut = item.isCut; }; m_ActionsTreeView.itemsChosen += objects => diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/InputActionMapsTreeViewItem.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/InputActionMapsTreeViewItem.cs index 8c99f99ae4..1313f6682e 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/InputActionMapsTreeViewItem.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/InputActionMapsTreeViewItem.cs @@ -26,6 +26,8 @@ internal class InputActionMapsTreeViewItem : VisualElement private bool m_IsEditing; private static InputActionMapsTreeViewItem s_EditingItem = null; + internal bool isDisabledActionMap { get; set; } + public InputActionMapsTreeViewItem() { var template = AssetDatabase.LoadAssetAtPath( @@ -98,7 +100,7 @@ public void Reset() public void FocusOnRenameTextField() { - if (m_IsEditing) + if (m_IsEditing || isDisabledActionMap) return; delegatesFocus = true; diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/InputActionsTreeViewItem.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/InputActionsTreeViewItem.cs index d1b49d2bb1..ccaae924e9 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/InputActionsTreeViewItem.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/InputActionsTreeViewItem.cs @@ -20,6 +20,8 @@ internal class InputActionsTreeViewItem : VisualElement private bool m_IsEditing; private static InputActionsTreeViewItem s_EditingItem = null; + internal bool isCut { get; set; } + public InputActionsTreeViewItem() { var template = AssetDatabase.LoadAssetAtPath( @@ -42,7 +44,6 @@ public InputActionsTreeViewItem() public Label label => this.Q