From f7f80b009b6e461e3a1c6e21adefe3ffd9548020 Mon Sep 17 00:00:00 2001 From: Pedro Ciambra Date: Mon, 11 Mar 2019 12:25:54 -0300 Subject: [PATCH] Implement source lookup for class_name defined classes Previous to this, classes defined with class_name had no behavior when ctrl-clicked in the editor. Fixes #26882 (cherry picked from commit e8fe174616b075db8a34b06dd1a19e93a9f7c0ad) --- editor/plugins/script_text_editor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index e95b1356bf2..554e12f9fd8 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -620,7 +620,9 @@ void ScriptTextEditor::_lookup_symbol(const String &p_symbol, int p_row, int p_c } ScriptLanguage::LookupResult result; - if (p_symbol.is_resource_file()) { + if (ScriptServer::is_global_class(p_symbol)) { + EditorNode::get_singleton()->load_resource(ScriptServer::get_global_class_path(p_symbol)); + } else if (p_symbol.is_resource_file()) { List scene_extensions; ResourceLoader::get_recognized_extensions_for_type("PackedScene", &scene_extensions);