diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index 6148762e74..f43554ee84 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -11,8 +11,10 @@ however, it has to be formatted properly to pass verification tests. ## [Unreleased] - yyyy-mm-dd ### Fixed +- Fixed an issue where the prompt to enable the InputSystem backends would interrupt the import of large assets. - Fixed Cut Mode for Action Maps and Actions to make renaming disabled. [ISXB-1155](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1155) + ## [1.12.0] - 2025-01-15 ### Fixed diff --git a/Packages/com.unity.inputsystem/InputSystem/InputSystem.cs b/Packages/com.unity.inputsystem/InputSystem/InputSystem.cs index 2acd8b9856..abbdf80abf 100644 --- a/Packages/com.unity.inputsystem/InputSystem/InputSystem.cs +++ b/Packages/com.unity.inputsystem/InputSystem/InputSystem.cs @@ -3599,14 +3599,29 @@ internal static void InitializeInEditor(IInputRuntime runtime = null) } Debug.Assert(settings != null); - #if UNITY_EDITOR Debug.Assert(EditorUtility.InstanceIDToObject(settings.GetInstanceID()) != null, "InputSettings has lost its native object"); - #endif // If native backends for new input system aren't enabled, ask user whether we should // enable them (requires restart). We only ask once per session and don't ask when // running in batch mode. + // 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 - + // this would cancel the import of large assets that are dependent on the InputSystem package and import it as a dependency. + EditorApplication.delayCall += ShowRestartWarning; + +#if UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS + // Make sure project wide input actions are enabled. + // Note that this will always fail if entering play-mode within editor since not yet in play-mode. + EnableActions(); +#endif + + RunInitialUpdate(); + + k_InputInitializeInEditorMarker.End(); + } + + private static void ShowRestartWarning() + { if (!s_SystemObject.newInputBackendsCheckedAsEnabled && !EditorPlayerSettingHelpers.newSystemBackendsEnabled && !s_Manager.m_Runtime.isInBatchMode) @@ -3622,16 +3637,7 @@ internal static void InitializeInEditor(IInputRuntime runtime = null) } } s_SystemObject.newInputBackendsCheckedAsEnabled = true; - -#if UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS - // Make sure project wide input actions are enabled. - // Note that this will always fail if entering play-mode within editor since not yet in play-mode. - EnableActions(); -#endif - - RunInitialUpdate(); - - k_InputInitializeInEditorMarker.End(); + EditorApplication.delayCall -= ShowRestartWarning; } internal static void OnPlayModeChange(PlayModeStateChange change)