File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 3030
3131#include " editor_object_selector.h"
3232
33+ #include " editor/debugger/editor_debugger_inspector.h"
3334#include " editor/editor_data.h"
3435#include " editor/editor_node.h"
3536#include " editor/editor_string_names.h"
@@ -131,6 +132,19 @@ void EditorObjectSelector::update_path() {
131132 Ref<Texture2D> obj_icon;
132133 if (Object::cast_to<MultiNodeEdit>(obj)) {
133134 obj_icon = EditorNode::get_singleton ()->get_class_icon (Object::cast_to<MultiNodeEdit>(obj)->get_edited_class_name ());
135+ } else if (Object::cast_to<EditorDebuggerRemoteObject>(obj)) {
136+ String class_name;
137+ Ref<Script> base_script = obj->get_script ();
138+ if (base_script.is_valid ()) {
139+ class_name = base_script->get_global_name ();
140+
141+ if (class_name.is_empty ()) {
142+ // If there is no class_name in this script we just take the script path.
143+ class_name = base_script->get_path ();
144+ }
145+ }
146+
147+ obj_icon = EditorNode::get_singleton ()->get_class_icon (class_name.is_empty () ? Object::cast_to<EditorDebuggerRemoteObject>(obj)->type_name : class_name);
134148 } else {
135149 obj_icon = EditorNode::get_singleton ()->get_object_icon (obj);
136150 }
You can’t perform that action at this time.
0 commit comments