1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-09 12:50:35 +00:00

Merge pull request #50786 from reduz/implement-resource-uids

Implement Resource UIDs
This commit is contained in:
Rémi Verschelde
2021-07-24 17:18:12 +02:00
committed by GitHub
25 changed files with 900 additions and 126 deletions

View File

@@ -178,6 +178,15 @@ void DependencyEditor::_update_list() {
path = n;
type = "Resource";
}
ResourceUID::ID uid = ResourceUID::get_singleton()->text_to_id(path);
if (uid != ResourceUID::INVALID_ID) {
// dependency is in uid format, obtain proper path
ERR_CONTINUE(!ResourceUID::get_singleton()->has_id(uid));
path = ResourceUID::get_singleton()->get_id_path(uid);
}
String name = path.get_file();
Ref<Texture2D> icon = EditorNode::get_singleton()->get_class_icon(type);