diff options
Diffstat (limited to 'core/io')
-rw-r--r-- | core/io/resource_importer.cpp | 8 | ||||
-rw-r--r-- | core/io/resource_importer.h | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/core/io/resource_importer.cpp b/core/io/resource_importer.cpp index e167611d4a..9b6440e2a2 100644 --- a/core/io/resource_importer.cpp +++ b/core/io/resource_importer.cpp @@ -464,7 +464,11 @@ void ResourceImporter::_bind_methods() { BIND_ENUM_CONSTANT(IMPORT_ORDER_SCENE); } -void ResourceFormatImporter::add_importer(const Ref<ResourceImporter> &p_importer) { +void ResourceFormatImporter::add_importer(const Ref<ResourceImporter> &p_importer, bool p_first_priority) { ERR_FAIL_COND(p_importer.is_null()); - importers.insert(0, p_importer); + if (p_first_priority) { + importers.insert(0, p_importer); + } else { + importers.push_back(p_importer); + } } diff --git a/core/io/resource_importer.h b/core/io/resource_importer.h index f242f29ccd..2fffc16ad8 100644 --- a/core/io/resource_importer.h +++ b/core/io/resource_importer.h @@ -80,7 +80,7 @@ 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); + void add_importer(const Ref<ResourceImporter> &p_importer, bool p_first_priority = false); void remove_importer(const Ref<ResourceImporter> &p_importer) { importers.erase(p_importer); } Ref<ResourceImporter> get_importer_by_name(const String &p_name) const; |