MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / resource_changed_emit

Method resource_changed_emit

core/io/resource_loader.cpp:996–1006  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

994}
995
996void ResourceLoader::resource_changed_emit(Resource *p_source) {
997 print_lt(vformat("%d\t%ud:%s\t" FUNCTION_STR, Thread::get_caller_id(), p_source->get_instance_id(), p_source->get_class()));
998
999 MutexLock lock(thread_load_mutex);
1000
1001 for (const ThreadLoadTask::ResourceChangedConnection &rcc : curr_load_task->resource_changed_connections) {
1002 if (unlikely(rcc.source == p_source)) {
1003 rcc.callable.call();
1004 }
1005 }
1006}
1007
1008Ref<Resource> ResourceLoader::ensure_resource_ref_override_for_outer_load(const String &p_path, const String &p_res_type) {
1009 ERR_FAIL_COND_V(load_nesting == 0, Ref<Resource>()); // It makes no sense to use this from nesting level 0.

Callers

nothing calls this directly

Calls 4

vformatFunction · 0.85
get_instance_idMethod · 0.45
get_classMethod · 0.45
callMethod · 0.45

Tested by

no test coverage detected