Make sure ResurceLoader.exists works on imported files, fixes #23555
This commit is contained in:
parent
3aff78f532
commit
ffd44530fb
2 changed files with 6 additions and 0 deletions
|
@ -183,6 +183,11 @@ void ResourceFormatImporter::get_recognized_extensions_for_type(const String &p_
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ResourceFormatImporter::exists(const String &p_path) const {
|
||||||
|
|
||||||
|
return FileAccess::exists(p_path + ".import");
|
||||||
|
}
|
||||||
|
|
||||||
bool ResourceFormatImporter::recognize_path(const String &p_path, const String &p_for_type) const {
|
bool ResourceFormatImporter::recognize_path(const String &p_path, const String &p_for_type) const {
|
||||||
|
|
||||||
return FileAccess::exists(p_path + ".import");
|
return FileAccess::exists(p_path + ".import");
|
||||||
|
|
|
@ -69,6 +69,7 @@ public:
|
||||||
virtual bool is_import_valid(const String &p_path) const;
|
virtual bool is_import_valid(const String &p_path) const;
|
||||||
virtual void get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types = false);
|
virtual void get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types = false);
|
||||||
virtual bool is_imported(const String &p_path) const { return recognize_path(p_path); }
|
virtual bool is_imported(const String &p_path) const { return recognize_path(p_path); }
|
||||||
|
virtual bool exists(const String &p_path) const;
|
||||||
|
|
||||||
virtual bool can_be_imported(const String &p_path) const;
|
virtual bool can_be_imported(const String &p_path) const;
|
||||||
virtual int get_import_order(const String &p_path) const;
|
virtual int get_import_order(const String &p_path) const;
|
||||||
|
|
Loading…
Reference in a new issue