Skip to content

Commit

Permalink
Fix ResourceLoader is not verbosely printing a resource path on loading
Browse files Browse the repository at this point in the history
(cherry picked from commit bfb5570)
  • Loading branch information
gongpha authored and RandomShaper committed Sep 5, 2024
1 parent f4b8ce2 commit 951d430
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions core/io/resource_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,12 +351,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<Resource> 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;
Expand Down

0 comments on commit 951d430

Please sign in to comment.