Skip to content

Commit

Permalink
Provide ability to override _export_end() in cpp.
Browse files Browse the repository at this point in the history
  • Loading branch information
Daylily-Zeleen committed Apr 22, 2023
1 parent 6f1a52b commit 5afc311
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion editor/export/editor_export_platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -512,8 +512,10 @@ EditorExportPlatform::ExportNotifier::~ExportNotifier() {
for (int i = 0; i < export_plugins.size(); i++) {
if (export_plugins[i]->get_script_instance()) {
export_plugins.write[i]->_export_end_script();
} else {
export_plugins.write[i]->_export_end();
}
export_plugins.write[i]->_export_end();
export_plugins.write[i]->_export_end_clear();
export_plugins.write[i]->set_export_preset(Ref<EditorExportPlugin>());
}
}
Expand Down
2 changes: 2 additions & 0 deletions editor/export/editor_export_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ void EditorExportPlugin::_export_file(const String &p_path, const String &p_type
void EditorExportPlugin::_export_begin(const HashSet<String> &p_features, bool p_debug, const String &p_path, int p_flags) {
}

void EditorExportPlugin::_export_end() {}

void EditorExportPlugin::skip() {
skipped = true;
}
Expand Down
3 changes: 2 additions & 1 deletion editor/export/editor_export_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class EditorExportPlugin : public RefCounted {
skipped = false;
}

_FORCE_INLINE_ void _export_end() {
_FORCE_INLINE_ void _export_end_clear() {
ios_frameworks.clear();
ios_embedded_frameworks.clear();
ios_bundle_files.clear();
Expand Down Expand Up @@ -105,6 +105,7 @@ class EditorExportPlugin : public RefCounted {

virtual void _export_file(const String &p_path, const String &p_type, const HashSet<String> &p_features);
virtual void _export_begin(const HashSet<String> &p_features, bool p_debug, const String &p_path, int p_flags);
virtual void _export_end();

static void _bind_methods();

Expand Down

0 comments on commit 5afc311

Please sign in to comment.