From 8a2c30e5dc12a0fc23fae678f736d7a3be752f65 Mon Sep 17 00:00:00 2001 From: kobewi Date: Wed, 12 Feb 2025 23:00:28 +0100 Subject: [PATCH] Show file when FileSystem is searched with UID --- editor/docks/filesystem_dock.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/editor/docks/filesystem_dock.cpp b/editor/docks/filesystem_dock.cpp index 529786c5e70..7008a8bf3b7 100644 --- a/editor/docks/filesystem_dock.cpp +++ b/editor/docks/filesystem_dock.cpp @@ -2734,6 +2734,14 @@ void FileSystemDock::_search_changed(const String &p_text, const Control *p_from } const String searched_string = p_text.to_lower(); + if (searched_string.begins_with("uid://")) { + ResourceUID::ID id = ResourceUID::get_singleton()->text_to_id(searched_string); + if (id != ResourceUID::INVALID_ID && ResourceUID::get_singleton()->has_id(id)) { + navigate_to_path(ResourceUID::get_singleton()->get_id_path(id)); + return; + } + } + searched_tokens = searched_string.split(" ", false); if (p_from == tree_search_box) {