diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-03-27 12:26:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-27 12:26:08 +0200 |
commit | a5eed70fa2edcf755d6abea2077232e38381449b (patch) | |
tree | b86182c1cd00baaae5c7eb54b0bfef4b18a769de | |
parent | 9139146b6cac0140212a1d50349666632b308e29 (diff) | |
parent | 93b7a85c98746ca7fefafa88dc1797de9867a521 (diff) |
Merge pull request #59561 from akien-mga/js-export-explain-why-no-templates
-rw-r--r-- | platform/javascript/export/export_plugin.cpp | 9 | ||||
-rw-r--r-- | platform/uwp/export/export_plugin.cpp | 8 |
2 files changed, 17 insertions, 0 deletions
diff --git a/platform/javascript/export/export_plugin.cpp b/platform/javascript/export/export_plugin.cpp index 4448acccc2..84694461cf 100644 --- a/platform/javascript/export/export_plugin.cpp +++ b/platform/javascript/export/export_plugin.cpp @@ -360,6 +360,15 @@ Ref<Texture2D> EditorExportPlatformJavaScript::get_logo() const { } bool EditorExportPlatformJavaScript::can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const { +#ifndef DEV_ENABLED + // We don't provide export templates for the HTML5 platform currently as there + // is no suitable renderer to use with them. So we forbid exporting and tell + // users why. This is skipped in DEV_ENABLED so that contributors can still test + // the pipeline once we start having WebGL or WebGPU support. + r_error = "The HTML5 platform is currently not supported in Godot 4.0, as there is no suitable renderer for it.\n"; + return false; +#endif + String err; bool valid = false; ExportMode mode = (ExportMode)(int)p_preset->get("variant/export_type"); diff --git a/platform/uwp/export/export_plugin.cpp b/platform/uwp/export/export_plugin.cpp index 230e5c749c..88343d6f85 100644 --- a/platform/uwp/export/export_plugin.cpp +++ b/platform/uwp/export/export_plugin.cpp @@ -131,6 +131,14 @@ void EditorExportPlatformUWP::get_export_options(List<ExportOption> *r_options) } bool EditorExportPlatformUWP::can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const { +#ifndef DEV_ENABLED + // We don't provide export templates for the UWP platform currently as it + // has not been ported for Godot 4.0. This is skipped in DEV_ENABLED so that + // contributors can still test the pipeline if/when we can build it again. + r_error = "The UWP platform is currently not supported in Godot 4.0.\n"; + return false; +#endif + String err; bool valid = false; |