Skip to content

Commit 7d186cb

Browse files
committed
Add UID to file tooltip
1 parent a210fe6 commit 7d186cb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

editor/plugins/editor_resource_tooltip_plugins.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030

3131
#include "editor_resource_tooltip_plugins.h"
3232

33+
#include "editor/editor_file_system.h"
3334
#include "editor/editor_resource_preview.h"
3435
#include "editor/themes/editor_scale.h"
3536
#include "scene/gui/box_container.h"
@@ -63,6 +64,12 @@ VBoxContainer *EditorResourceTooltipPlugin::make_default_tooltip(const String &p
6364
vb->add_child(label);
6465
}
6566

67+
ResourceUID::ID id = EditorFileSystem::get_singleton()->get_file_uid(p_resource_path);
68+
if (id != ResourceUID::INVALID_ID) {
69+
Label *label = memnew(Label(ResourceUID::get_singleton()->id_to_text(id)));
70+
vb->add_child(label);
71+
}
72+
6673
{
6774
Ref<FileAccess> f = FileAccess::open(p_resource_path, FileAccess::READ);
6875
Label *label = memnew(Label(vformat(TTR("Size: %s"), String::humanize_size(f->get_length()))));

0 commit comments

Comments
 (0)