Fix UID support in MultiplayerSpawner

This commit is contained in:
kobewi
2024-11-26 16:22:05 +01:00
parent bbc54692c0
commit 67b95f341e
3 changed files with 11 additions and 13 deletions

View File

@ -145,7 +145,12 @@ String ResourceUID::uid_to_path(const String &p_uid) {
}
String ResourceUID::path_to_uid(const String &p_path) {
return singleton->id_to_text(ResourceLoader::get_resource_uid(p_path));
const ID id = ResourceLoader::get_resource_uid(p_path);
if (id == INVALID_ID) {
return p_path;
} else {
return singleton->id_to_text(id);
}
}
String ResourceUID::ensure_path(const String &p_uid_or_path) {