mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Merge pull request #50786 from reduz/implement-resource-uids
Implement Resource UIDs
This commit is contained in:
commit
2b1e6e303e
25 changed files with 900 additions and 126 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue