From 25206e919d43ce1a9d03015121d9ee9d973785c4 Mon Sep 17 00:00:00 2001 From: Caroline Joy Bell Date: Fri, 1 Nov 2024 20:04:43 -0500 Subject: [PATCH] Fix exporter for 3.6 --- export/export.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/export/export.cpp b/export/export.cpp index d39d829..b7bffc2 100644 --- a/export/export.cpp +++ b/export/export.cpp @@ -276,7 +276,7 @@ class EditorExportPlatformSwitch : public EditorExportPlatform { return OK; } - virtual bool can_export(const Ref &p_preset, String &r_error, bool &r_missing_templates) const { + virtual bool has_valid_export_configuration(const Ref &p_preset, String &r_error, bool &r_missing_templates) const { String err; r_missing_templates = find_export_template(TEMPLATE_RELEASE) == String() || @@ -296,6 +296,10 @@ class EditorExportPlatformSwitch : public EditorExportPlatform { return valid; } + virtual bool has_valid_project_configuration(const Ref &p_preset, String &r_error) const { + return true; + } + virtual List get_binary_extensions(const Ref &p_preset) const { List list; list.push_back("nro"); @@ -592,6 +596,7 @@ void register_switch_exporter() { EDITOR_DEF("export/switch/build_romfs", ""); EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING, "export/switch/build_romfs", PROPERTY_HINT_GLOBAL_FILE, exe_ext)); - Ref exporter = Ref(memnew(EditorExportPlatformSwitch)); + Ref exporter; + exporter.instance(); EditorExport::get_singleton()->add_export_platform(exporter); }