summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Snopek <dsnopek@gmail.com>2023-08-25 10:52:30 -0500
committerDavid Snopek <dsnopek@gmail.com>2023-08-25 10:52:30 -0500
commitd09843c5ae6bc140fdaad5c20df38a47df55e21b (patch)
tree2220d17fd6c2479f3ccea0682b925e30cad2c6e8
parent6f90b23702be158349aa544cf1d6b231600bae92 (diff)
downloadredot-engine-d09843c5ae6bc140fdaad5c20df38a47df55e21b.tar.gz
Fix overriding _export_begin, _export_file and _export_end from GDExtension
-rw-r--r--editor/export/editor_export_platform.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/export/editor_export_platform.cpp b/editor/export/editor_export_platform.cpp
index 5ee9b187a2..058cc33c05 100644
--- a/editor/export/editor_export_platform.cpp
+++ b/editor/export/editor_export_platform.cpp
@@ -498,7 +498,7 @@ EditorExportPlatform::ExportNotifier::ExportNotifier(EditorExportPlatform &p_pla
//initial export plugin callback
for (int i = 0; i < export_plugins.size(); i++) {
export_plugins.write[i]->set_export_preset(p_preset);
- if (export_plugins[i]->get_script_instance()) { //script based
+ if (GDVIRTUAL_IS_OVERRIDDEN_PTR(export_plugins[i], _export_begin)) {
PackedStringArray features_psa;
for (const String &feature : features) {
features_psa.push_back(feature);
@@ -513,7 +513,7 @@ EditorExportPlatform::ExportNotifier::ExportNotifier(EditorExportPlatform &p_pla
EditorExportPlatform::ExportNotifier::~ExportNotifier() {
Vector<Ref<EditorExportPlugin>> export_plugins = EditorExport::get_singleton()->get_export_plugins();
for (int i = 0; i < export_plugins.size(); i++) {
- if (export_plugins[i]->get_script_instance()) {
+ if (GDVIRTUAL_IS_OVERRIDDEN_PTR(export_plugins[i], _export_end)) {
export_plugins.write[i]->_export_end_script();
}
export_plugins.write[i]->_export_end();
@@ -1223,7 +1223,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
bool do_export = true;
for (int i = 0; i < export_plugins.size(); i++) {
- if (export_plugins[i]->get_script_instance()) { //script based
+ if (GDVIRTUAL_IS_OVERRIDDEN_PTR(export_plugins[i], _export_file)) {
export_plugins.write[i]->_export_file_script(path, type, features_psa);
} else {
export_plugins.write[i]->_export_file(path, type, features);