1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-22 15:06:45 +00:00

Allow EditorExportPlugins to provide export options

This commit is contained in:
RedworkDE
2023-02-08 13:36:02 +01:00
parent c151d3231f
commit 6963e84b58
5 changed files with 79 additions and 4 deletions

View File

@@ -313,10 +313,19 @@ void EditorExport::update_export_presets() {
for (int i = 0; i < export_platforms.size(); i++) {
Ref<EditorExportPlatform> platform = export_platforms[i];
if (platform->should_update_export_options()) {
bool should_update = platform->should_update_export_options();
for (int j = 0; j < export_plugins.size(); j++) {
should_update |= export_plugins.write[j]->_should_update_export_options(platform);
}
if (should_update) {
List<EditorExportPlatform::ExportOption> options;
platform->get_export_options(&options);
for (int j = 0; j < export_plugins.size(); j++) {
export_plugins.write[j]->_get_export_options(platform, &options);
}
platform_options[platform->get_name()] = options;
}
}