diff options
author | Spartan322 <Megacake1234@gmail.com> | 2024-10-18 17:26:56 -0400 |
---|---|---|
committer | Spartan322 <Megacake1234@gmail.com> | 2024-10-18 17:26:56 -0400 |
commit | ebbe3e8c51fcf89f6b19a74497cedb5a8c448979 (patch) | |
tree | 075435b3a1b3ac57a75f1ca90865f61697c053f4 /scene/debugger | |
parent | edb8e2b1b2b09236bdcd76cb6c8b40b6fbb2abaf (diff) | |
parent | 80f0b33313dae52d072ba2771a88ebcc4f0b4d6d (diff) | |
download | redot-engine-ebbe3e8c51fcf89f6b19a74497cedb5a8c448979.tar.gz |
Merge commit godotengine/godot@80f0b33313dae52d072ba2771a88ebcc4f0b4d6d
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 32f00e35ef..a16c5e83d8 100644 --- a/scene/debugger/scene_debugger.cpp +++ b/scene/debugger/scene_debugger.cpp @@ -537,7 +537,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)); } } |