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); }