From bfb5570c033b633c030cc269d5e98213dfebd5a5 Mon Sep 17 00:00:00 2001 From: Kongfa Waroros Date: Mon, 29 Jul 2024 21:31:57 +0700 Subject: [PATCH] Fix ResourceLoader is not verbosely printing a resource path on loading --- core/io/resource_loader.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp index d2c4668d125..d755b7f9dc6 100644 --- a/core/io/resource_loader.cpp +++ b/core/io/resource_loader.cpp @@ -343,12 +343,19 @@ void ResourceLoader::_run_load_task(void *p_userdata) { bool xl_remapped = false; const String &remapped_path = _path_remap(load_task.local_path, &xl_remapped); + + print_verbose("Loading resource: " + remapped_path); + Error load_err = OK; Ref res = _load(remapped_path, remapped_path != load_task.local_path ? load_task.local_path : String(), load_task.type_hint, load_task.cache_mode, &load_err, load_task.use_sub_threads, &load_task.progress); if (MessageQueue::get_singleton() != MessageQueue::get_main_singleton()) { MessageQueue::get_singleton()->flush(); } + if (res.is_null()) { + print_verbose("Failed loading resource: " + remapped_path); + } + thread_load_mutex.lock(); load_task.resource = res;