diff options
author | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2023-05-09 18:59:59 +0200 |
---|---|---|
committer | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2023-05-10 18:53:41 +0200 |
commit | b6647a58080da116d74edf2eb9378b5bbe2e97cc (patch) | |
tree | c356a40e596f01f02d64e4c2daa4fbef52cb99b5 /core | |
parent | 5a4613f5512b84a758d7cb4850f6e35db2bcceba (diff) | |
download | redot-engine-b6647a58080da116d74edf2eb9378b5bbe2e97cc.tar.gz |
Avoid sync issues in materials with scheduled shader updates
Diffstat (limited to 'core')
-rw-r--r-- | core/io/resource_loader.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/io/resource_loader.h b/core/io/resource_loader.h index 0615ae63aa..2bb46387e9 100644 --- a/core/io/resource_loader.h +++ b/core/io/resource_loader.h @@ -199,6 +199,8 @@ public: static ThreadLoadStatus load_threaded_get_status(const String &p_path, float *r_progress = nullptr); static Ref<Resource> load_threaded_get(const String &p_path, Error *r_error = nullptr); + static bool is_within_load() { return load_nesting > 0; }; + static Ref<Resource> load(const String &p_path, const String &p_type_hint = "", ResourceFormatLoader::CacheMode p_cache_mode = ResourceFormatLoader::CACHE_MODE_REUSE, Error *r_error = nullptr); static bool exists(const String &p_path, const String &p_type_hint = ""); |