Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide ability to override EditorExportPlugin::_export_end() in C++ #72572

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion editor/export/editor_export_platform.cpp
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
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
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