summaryrefslogtreecommitdiff
path: root/editor/dependency_editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/dependency_editor.cpp')
-rw-r--r--editor/dependency_editor.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp
index c18b8743cd..9824397076 100644
--- a/editor/dependency_editor.cpp
+++ b/editor/dependency_editor.cpp
@@ -180,6 +180,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);