diff options
author | Bogdan Inculet <inculet.bogdan@gmail.com> | 2024-02-17 06:06:09 +0200 |
---|---|---|
committer | Bogdan Inculet <inculet.bogdan@gmail.com> | 2024-10-15 22:28:53 +0300 |
commit | fb58ea6c89ff3f9e970e436982c76e96adccdefc (patch) | |
tree | abbca6bcf33292a8775b97ca57ccb77750ddbe95 /scene/debugger | |
parent | af77100e394dcaca609b15bef815ed17475e51ed (diff) | |
download | redot-engine-fb58ea6c89ff3f9e970e436982c76e96adccdefc.tar.gz |
Fixed Remote Nodes missing custom icons
Diffstat (limited to 'scene/debugger')
-rw-r--r-- | scene/debugger/scene_debugger.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/scene/debugger/scene_debugger.cpp b/scene/debugger/scene_debugger.cpp index 07c32eef13..22e5238fae 100644 --- a/scene/debugger/scene_debugger.cpp +++ b/scene/debugger/scene_debugger.cpp @@ -535,7 +535,21 @@ SceneDebuggerTree::SceneDebuggerTree(Node *p_root) { } } } - nodes.push_back(RemoteNode(count, n->get_name(), n->get_class(), n->get_instance_id(), n->get_scene_file_path(), view_flags)); + + String class_name; + ScriptInstance *script_instance = n->get_script_instance(); + if (script_instance) { + Ref<Script> script = script_instance->get_script(); + if (script.is_valid()) { + class_name = script->get_global_name(); + + if (class_name.is_empty()) { + // If there is no class_name in this script we just take the script path. + class_name = script->get_path(); + } + } + } + nodes.push_back(RemoteNode(count, n->get_name(), class_name.is_empty() ? n->get_class() : class_name, n->get_instance_id(), n->get_scene_file_path(), view_flags)); } } |