diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-07-24 17:18:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-24 17:18:12 +0200 |
commit | 2b1e6e303ed6b0e2ca408f2156b745e711c2bab7 (patch) | |
tree | 0ec902365a812d3cd8c449cd3983df48e10feb1a /scene/resources/resource_format_text.h | |
parent | 96d7bc62af25b85b8b9cc091eeea1e7a784ba624 (diff) | |
parent | 32b43cfeb38dc83ba8024acec32bdfc706c86a46 (diff) |
Merge pull request #50786 from reduz/implement-resource-uids
Implement Resource UIDs
Diffstat (limited to 'scene/resources/resource_format_text.h')
-rw-r--r-- | scene/resources/resource_format_text.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/resources/resource_format_text.h b/scene/resources/resource_format_text.h index 5173619a17..373e71b2c4 100644 --- a/scene/resources/resource_format_text.h +++ b/scene/resources/resource_format_text.h @@ -74,6 +74,8 @@ class ResourceLoaderText { mutable int lines = 0; + ResourceUID::ID res_uid = ResourceUID::INVALID_ID; + Map<String, String> remaps; static Error _parse_sub_resources(void *p_self, VariantParser::Stream *p_stream, Ref<Resource> &r_res, int &line, String &r_err_str) { return reinterpret_cast<ResourceLoaderText *>(p_self)->_parse_sub_resource(p_stream, r_res, line, r_err_str); } @@ -120,6 +122,7 @@ public: void open(FileAccess *p_f, bool p_skip_first_tag = false); String recognize(FileAccess *p_f); + ResourceUID::ID get_uid(FileAccess *p_f); void get_dependencies(FileAccess *p_f, List<String> *p_dependencies, bool p_add_types); Error rename_dependencies(FileAccess *p_f, const String &p_path, const Map<String, String> &p_map); @@ -136,6 +139,7 @@ public: virtual void get_recognized_extensions(List<String> *p_extensions) const; virtual bool handles_type(const String &p_type) const; virtual String get_resource_type(const String &p_path) const; + virtual ResourceUID::ID get_resource_uid(const String &p_path) const; virtual void get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types = false); virtual Error rename_dependencies(const String &p_path, const Map<String, String> &p_map); |