| 3106 | } |
| 3107 | |
| 3108 | String 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 | |
| 3119 | bool is_packed_scene(const Ref<Resource> &p_resource) { |
| 3120 | return p_resource.is_valid() && _resource_get_class(p_resource) == "PackedScene"; |
nothing calls this directly
no test coverage detected