diff options
Diffstat (limited to 'core/io/resource_loader.h')
-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 = ""); |