summaryrefslogtreecommitdiff
path: root/core/io
diff options
context:
space:
mode:
Diffstat (limited to 'core/io')
-rw-r--r--core/io/resource_importer.cpp5
-rw-r--r--core/io/resource_importer.h5
2 files changed, 7 insertions, 3 deletions
diff --git a/core/io/resource_importer.cpp b/core/io/resource_importer.cpp
index 470fb2d42d..e167611d4a 100644
--- a/core/io/resource_importer.cpp
+++ b/core/io/resource_importer.cpp
@@ -463,3 +463,8 @@ void ResourceImporter::_bind_methods() {
BIND_ENUM_CONSTANT(IMPORT_ORDER_DEFAULT);
BIND_ENUM_CONSTANT(IMPORT_ORDER_SCENE);
}
+
+void ResourceFormatImporter::add_importer(const Ref<ResourceImporter> &p_importer) {
+ ERR_FAIL_COND(p_importer.is_null());
+ importers.insert(0, p_importer);
+}
diff --git a/core/io/resource_importer.h b/core/io/resource_importer.h
index 261afbab69..f242f29ccd 100644
--- a/core/io/resource_importer.h
+++ b/core/io/resource_importer.h
@@ -80,9 +80,8 @@ public:
String get_internal_resource_path(const String &p_path) const;
void get_internal_resource_path_list(const String &p_path, List<String> *r_paths);
- void add_importer(const Ref<ResourceImporter> &p_importer) {
- importers.push_back(p_importer);
- }
+ void add_importer(const Ref<ResourceImporter> &p_importer);
+
void remove_importer(const Ref<ResourceImporter> &p_importer) { importers.erase(p_importer); }
Ref<ResourceImporter> get_importer_by_name(const String &p_name) const;
Ref<ResourceImporter> get_importer_by_extension(const String &p_extension) const;