From 21ac484c812bdef0208465f1bbc2f196558efcf7 Mon Sep 17 00:00:00 2001 From: Ivan Shakhov Date: Wed, 30 Nov 2022 10:53:20 +0100 Subject: [PATCH] fix RIDER-85695 Unity doesn't start from the toolbar if Android plugin is installed --- .../rider/plugins/unity/actions/AttachToUnityEditorAction.kt | 2 +- .../jetbrains/rider/plugins/unity/actions/StartUnityAction.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rider/src/main/kotlin/com/jetbrains/rider/plugins/unity/actions/AttachToUnityEditorAction.kt b/rider/src/main/kotlin/com/jetbrains/rider/plugins/unity/actions/AttachToUnityEditorAction.kt index 0de769db25..65b0505cdd 100644 --- a/rider/src/main/kotlin/com/jetbrains/rider/plugins/unity/actions/AttachToUnityEditorAction.kt +++ b/rider/src/main/kotlin/com/jetbrains/rider/plugins/unity/actions/AttachToUnityEditorAction.kt @@ -22,7 +22,7 @@ class AttachUnityEditorAction: DumbAwareAction() { if (settings != null) { ExecutionUtil.runConfiguration(settings, - Executor.EXECUTOR_EXTENSION_NAME.extensionList.single { it is DefaultDebugExecutor }) + Executor.EXECUTOR_EXTENSION_NAME.extensionList.single { it is DefaultDebugExecutor && it.id == DefaultDebugExecutor.EXECUTOR_ID }) } else { logger.warn("Have not found run-configuration ${DefaultRunConfigurationGenerator.ATTACH_CONFIGURATION_NAME}.") } diff --git a/rider/src/main/kotlin/com/jetbrains/rider/plugins/unity/actions/StartUnityAction.kt b/rider/src/main/kotlin/com/jetbrains/rider/plugins/unity/actions/StartUnityAction.kt index 716eb21d6e..366c2773ea 100644 --- a/rider/src/main/kotlin/com/jetbrains/rider/plugins/unity/actions/StartUnityAction.kt +++ b/rider/src/main/kotlin/com/jetbrains/rider/plugins/unity/actions/StartUnityAction.kt @@ -47,7 +47,7 @@ open class StartUnityAction : DumbAwareAction() { runManager.findConfigurationByTypeAndName(UnityExeConfigurationType.id, DefaultRunConfigurationGenerator.RUN_DEBUG_START_UNITY_CONFIGURATION_NAME) if (settings?.configuration != null && ExecutionTargetManager.getInstance(project).getTargetsFor(settings.configuration).isEmpty()){ - ExecutionUtil.runConfiguration(settings, Executor.EXECUTOR_EXTENSION_NAME.extensionList.single {it is DefaultRunExecutor }) + ExecutionUtil.runConfiguration(settings, Executor.EXECUTOR_EXTENSION_NAME.extensionList.single {it is DefaultRunExecutor && it.id == DefaultRunExecutor.EXECUTOR_ID}) } else { logger.warn("UnityExeConfiguration ${DefaultRunConfigurationGenerator.RUN_DEBUG_START_UNITY_CONFIGURATION_NAME} was not found.")