Skip to content

Commit

Permalink
Fix exporter for 3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
halotroop2288 committed Nov 2, 2024
1 parent dd65d3d commit 25206e9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions export/export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ class EditorExportPlatformSwitch : public EditorExportPlatform {
return OK;
}

virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const {
virtual bool has_valid_export_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const {
String err;
r_missing_templates =
find_export_template(TEMPLATE_RELEASE) == String() ||
Expand All @@ -296,6 +296,10 @@ class EditorExportPlatformSwitch : public EditorExportPlatform {
return valid;
}

virtual bool has_valid_project_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error) const {
return true;
}

virtual List<String> get_binary_extensions(const Ref<EditorExportPreset> &p_preset) const {
List<String> list;
list.push_back("nro");
Expand Down Expand Up @@ -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<EditorExportPlatformSwitch> exporter = Ref<EditorExportPlatformSwitch>(memnew(EditorExportPlatformSwitch));
Ref<EditorExportPlatformSwitch> exporter;
exporter.instance();
EditorExport::get_singleton()->add_export_platform(exporter);
}

0 comments on commit 25206e9

Please sign in to comment.