Skip to content

Commit acf95b9

Browse files
authored
Merge branch 'develop' into isxb-1208-InvalidOperation-enter-playmode
2 parents b4d827b + 7b21b83 commit acf95b9

File tree

6 files changed

+31
-15
lines changed

6 files changed

+31
-15
lines changed

Packages/com.unity.inputsystem/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ however, it has to be formatted properly to pass verification tests.
1212
### Fixed
1313
- Fixed an issue causing InvalidOperationException when entering playmode with domain reload disabled. [ISXB-1208](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1208).
1414

15+
### Fixed
16+
- Fixed an issue where the prompt to enable the InputSystem backends would interrupt the import of large assets.
17+
- Fixed Cut Mode for Action Maps and Actions to make renaming disabled. [ISXB-1155](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1155)
18+
19+
1520
## [1.12.0] - 2025-01-15
1621

1722
### Fixed

Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/ActionMapsView.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public ActionMapsView(VisualElement root, StateContainer stateContainer)
3232
treeViewItem.EditTextFinished += treeViewItem.EditTextFinishedCallback;
3333
treeViewItem.userData = i;
3434
element.SetEnabled(!mapData.isDisabled);
35+
treeViewItem.isDisabledActionMap = mapData.isDisabled;
3536

3637
ContextMenu.GetContextMenuForActionMapItem(this, treeViewItem, i);
3738
};

Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/ActionsTreeView.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ public ActionsTreeView(VisualElement root, StateContainer stateContainer)
9494
EditorInputControlLayoutCache.GetIconForLayout("Control"));
9595

9696
e.SetEnabled(!item.isCut);
97+
treeViewItem.isCut = item.isCut;
9798
};
9899

99100
m_ActionsTreeView.itemsChosen += objects =>

Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/InputActionMapsTreeViewItem.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ internal class InputActionMapsTreeViewItem : VisualElement
2626
private bool m_IsEditing;
2727
private static InputActionMapsTreeViewItem s_EditingItem = null;
2828

29+
internal bool isDisabledActionMap { get; set; }
30+
2931
public InputActionMapsTreeViewItem()
3032
{
3133
var template = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>(
@@ -98,7 +100,7 @@ public void Reset()
98100

99101
public void FocusOnRenameTextField()
100102
{
101-
if (m_IsEditing)
103+
if (m_IsEditing || isDisabledActionMap)
102104
return;
103105
delegatesFocus = true;
104106

Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/InputActionsTreeViewItem.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ internal class InputActionsTreeViewItem : VisualElement
2020
private bool m_IsEditing;
2121
private static InputActionsTreeViewItem s_EditingItem = null;
2222

23+
internal bool isCut { get; set; }
24+
2325
public InputActionsTreeViewItem()
2426
{
2527
var template = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>(
@@ -42,7 +44,6 @@ public InputActionsTreeViewItem()
4244
public Label label => this.Q<Label>();
4345
private TextField renameTextfield => this.Q<TextField>(kRenameTextField);
4446

45-
4647
public void UnregisterInputField()
4748
{
4849
renameTextfield.SetEnabled(false);
@@ -77,7 +78,7 @@ public void Reset()
7778

7879
public void FocusOnRenameTextField()
7980
{
80-
if (m_IsEditing)
81+
if (m_IsEditing || isCut)
8182
return;
8283
delegatesFocus = true;
8384

Packages/com.unity.inputsystem/InputSystem/InputSystem.cs

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3599,14 +3599,29 @@ internal static void InitializeInEditor(IInputRuntime runtime = null)
35993599
}
36003600

36013601
Debug.Assert(settings != null);
3602-
#if UNITY_EDITOR
36033602
Debug.Assert(EditorUtility.InstanceIDToObject(settings.GetInstanceID()) != null,
36043603
"InputSettings has lost its native object");
3605-
#endif
36063604

36073605
// If native backends for new input system aren't enabled, ask user whether we should
36083606
// enable them (requires restart). We only ask once per session and don't ask when
36093607
// running in batch mode.
3608+
// The warning is delayed to delay call (called a short while after the Asset are loaded, on Inspector update) to make sure it doesn't pop up while the editor is still loading or assets are not fully loaded -
3609+
// this would cancel the import of large assets that are dependent on the InputSystem package and import it as a dependency.
3610+
EditorApplication.delayCall += ShowRestartWarning;
3611+
3612+
#if UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS
3613+
// Make sure project wide input actions are enabled.
3614+
// Note that this will always fail if entering play-mode within editor since not yet in play-mode.
3615+
EnableActions();
3616+
#endif
3617+
3618+
RunInitialUpdate();
3619+
3620+
k_InputInitializeInEditorMarker.End();
3621+
}
3622+
3623+
private static void ShowRestartWarning()
3624+
{
36103625
if (!s_SystemObject.newInputBackendsCheckedAsEnabled &&
36113626
!EditorPlayerSettingHelpers.newSystemBackendsEnabled &&
36123627
!s_Manager.m_Runtime.isInBatchMode)
@@ -3622,16 +3637,7 @@ internal static void InitializeInEditor(IInputRuntime runtime = null)
36223637
}
36233638
}
36243639
s_SystemObject.newInputBackendsCheckedAsEnabled = true;
3625-
3626-
#if UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS
3627-
// Make sure project wide input actions are enabled.
3628-
// Note that this will always fail if entering play-mode within editor since not yet in play-mode.
3629-
EnableActions();
3630-
#endif
3631-
3632-
RunInitialUpdate();
3633-
3634-
k_InputInitializeInEditorMarker.End();
3640+
EditorApplication.delayCall -= ShowRestartWarning;
36353641
}
36363642

36373643
internal static void OnPlayModeChange(PlayModeStateChange change)

0 commit comments

Comments
 (0)