MCPcopy Create free account
hub / github.com/GDRETools/gdsdecomp / get_local_path

Method get_local_path

compat/resource_compat_text.cpp:3108–3117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3106}
3107
3108String ResourceFormatSaverCompatTextInstance::get_local_path(const String &p_path, const Ref<Resource> &p_resource) {
3109 if (p_path.begins_with("res://") || p_path.begins_with("user://")) {
3110 return p_path;
3111 }
3112 String resource_path = GDRESettings::get_singleton()->get_project_path();
3113 if (!resource_path.is_empty() && p_path.simplify_path().begins_with(resource_path)) {
3114 return GDRESettings::get_singleton()->localize_path(p_path);
3115 }
3116 return p_resource.is_valid() ? p_resource->get_path() : "";
3117}
3118
3119bool is_packed_scene(const Ref<Resource> &p_resource) {
3120 return p_resource.is_valid() && _resource_get_class(p_resource) == "PackedScene";

Callers

nothing calls this directly

Calls 4

get_project_pathMethod · 0.80
localize_pathMethod · 0.80
is_validMethod · 0.45
get_pathMethod · 0.45

Tested by

no test coverage detected