diff options
Diffstat (limited to 'platform/android')
-rw-r--r-- | platform/android/doc_classes/EditorExportPlatformAndroid.xml | 1 | ||||
-rw-r--r-- | platform/android/export/export.cpp | 3 | ||||
-rw-r--r-- | platform/android/export/export_plugin.cpp | 8 |
3 files changed, 10 insertions, 2 deletions
diff --git a/platform/android/doc_classes/EditorExportPlatformAndroid.xml b/platform/android/doc_classes/EditorExportPlatformAndroid.xml index d270980d72..0f1da54376 100644 --- a/platform/android/doc_classes/EditorExportPlatformAndroid.xml +++ b/platform/android/doc_classes/EditorExportPlatformAndroid.xml @@ -8,6 +8,7 @@ <tutorials> <link title="Exporting for Android">$DOCS_URL/tutorials/export/exporting_for_android.html</link> <link title="Custom builds for Android">$DOCS_URL/tutorials/export/android_custom_build.html</link> + <link title="Android plugins documentation index">$DOCS_URL/tutorials/platform/index.html</link> </tutorials> <members> <member name="apk_expansion/SALT" type="String" setter="" getter=""> diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp index 32b46271fd..682603e46b 100644 --- a/platform/android/export/export.cpp +++ b/platform/android/export/export.cpp @@ -53,6 +53,9 @@ void register_android_exporter() { EDITOR_DEF("export/android/shutdown_adb_on_exit", true); EDITOR_DEF("export/android/one_click_deploy_clear_previous_install", false); + + EDITOR_DEF("export/android/use_wifi_for_remote_debug", false); + EDITOR_DEF("export/android/wifi_remote_debug_host", "localhost"); #endif Ref<EditorExportPlatformAndroid> exporter = Ref<EditorExportPlatformAndroid>(memnew(EditorExportPlatformAndroid)); diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp index 21de46f4fc..15ded5c61e 100644 --- a/platform/android/export/export_plugin.cpp +++ b/platform/android/export/export_plugin.cpp @@ -1954,8 +1954,9 @@ Error EditorExportPlatformAndroid::run(const Ref<EditorExportPreset> &p_preset, return ERR_SKIP; } + const bool use_wifi_for_remote_debug = EDITOR_GET("export/android/use_wifi_for_remote_debug"); const bool use_remote = (p_debug_flags & DEBUG_FLAG_REMOTE_DEBUG) || (p_debug_flags & DEBUG_FLAG_DUMB_CLIENT); - const bool use_reverse = devices[p_device].api_level >= 21; + const bool use_reverse = devices[p_device].api_level >= 21 && !use_wifi_for_remote_debug; if (use_reverse) { p_debug_flags |= DEBUG_FLAG_REMOTE_DEBUG_LOCALHOST; @@ -2068,7 +2069,10 @@ Error EditorExportPlatformAndroid::run(const Ref<EditorExportPreset> &p_preset, print_line("Reverse result2: " + itos(rv)); } } else { - static const char *const msg = "--- Device API < 21; debugging over Wi-Fi ---"; + static const char *const api_version_msg = "--- Device API < 21; debugging over Wi-Fi ---"; + static const char *const manual_override_msg = "--- Wi-Fi remote debug enabled in project settings; debugging over Wi-Fi ---"; + + const char *const msg = use_wifi_for_remote_debug ? manual_override_msg : api_version_msg; EditorNode::get_singleton()->get_log()->add_message(msg, EditorLog::MSG_TYPE_EDITOR); print_line(String(msg).to_upper()); } |