summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorFilip <filip@mazan.in>2021-01-09 23:03:48 +0100
committerFilip <filip@mazan.in>2021-01-10 10:13:01 +0100
commit4383c5026a118b9536a24760b246a1ac7d0a3b7e (patch)
tree4cdd5abde37673f2c5dba86981faadd2caa342c5 /editor
parent98ccaa1bad97bdb83b2afd6a4df6f7a392745592 (diff)
Add all AutoLoad resources when exporting the project
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_export.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index fd4423646f..dd3e81c8c0 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -732,6 +732,26 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
_export_find_dependencies(files[i], paths);
}
+
+ // Add autoload resources and their dependencies
+ List<PropertyInfo> props;
+ ProjectSettings::get_singleton()->get_property_list(&props);
+
+ for (List<PropertyInfo>::Element *E = props.front(); E; E = E->next()) {
+ const PropertyInfo &pi = E->get();
+
+ if (!pi.name.begins_with("autoload/")) {
+ continue;
+ }
+
+ String autoload_path = ProjectSettings::get_singleton()->get(pi.name);
+
+ if (autoload_path.begins_with("*")) {
+ autoload_path = autoload_path.substr(1);
+ }
+
+ _export_find_dependencies(autoload_path, paths);
+ }
}
//add native icons to non-resource include list