Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CHANGE: added more information in the dialog to restart the editor. #1913

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions Packages/com.unity.inputsystem/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ however, it has to be formatted properly to pass verification tests.
### Changed
- For Unity 6.0 and above, when an `EventSystem` GameObject is created in the Editor it will have the
`InputSystemUIInputModule` by default if the Input System package is installed and enabled.
- Added information to the 'Restart Editor' dialog to clarify impact on packages pending import [ISXB-608](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-608).

## [1.8.1] - 2024-03-14

Expand Down
9 changes: 5 additions & 4 deletions Packages/com.unity.inputsystem/InputSystem/InputSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3599,11 +3599,12 @@ internal static void InitializeInEditor(IInputRuntime runtime = null)
!EditorPlayerSettingHelpers.newSystemBackendsEnabled &&
!s_Manager.m_Runtime.isInBatchMode)
{
const string dialogText = "This project is using the new input system package but the native platform backends for the new input system are not enabled in the player settings. " +
"This means that no input from native devices will come through." +
"\n\nDo you want to enable the backends? Doing so will *RESTART* the editor.";
const string dialogText =
"Unity is importing the newer Input System package, but the older Input Manager is currently active. The Input System package needs to enable the newer system and and restart the Editor now.\r\n" +
"If you don't enable and restart now, the old input manager will remain active, and the Input System package won't work correctly.\r\n" +
"Note: If you were installing a different package (such as an Asset Store package) for which the Input System is a dependency, this restart will interrupt the import process. This means once the Editor has restarted, you must return to the Package Manager window and import your intended package again to finish the import process.";

if (EditorUtility.DisplayDialog("Warning", dialogText, "Yes", "No"))
if (EditorUtility.DisplayDialog("Warning", dialogText, "Enable and restart Editor now", "Cancel"))
{
EditorPlayerSettingHelpers.newSystemBackendsEnabled = true;
EditorHelpers.RestartEditorAndRecompileScripts();
Expand Down