summaryrefslogtreecommitdiffstats
path: root/scene/debugger/scene_debugger.cpp
diff options
context:
space:
mode:
authorSpartan322 <Megacake1234@gmail.com>2024-10-18 17:26:56 -0400
committerSpartan322 <Megacake1234@gmail.com>2024-10-18 17:26:56 -0400
commitebbe3e8c51fcf89f6b19a74497cedb5a8c448979 (patch)
tree075435b3a1b3ac57a75f1ca90865f61697c053f4 /scene/debugger/scene_debugger.cpp
parentedb8e2b1b2b09236bdcd76cb6c8b40b6fbb2abaf (diff)
parent80f0b33313dae52d072ba2771a88ebcc4f0b4d6d (diff)
downloadredot-engine-ebbe3e8c51fcf89f6b19a74497cedb5a8c448979.tar.gz
Merge commit godotengine/godot@80f0b33313dae52d072ba2771a88ebcc4f0b4d6d
Diffstat (limited to 'scene/debugger/scene_debugger.cpp')
-rw-r--r--scene/debugger/scene_debugger.cpp16
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));
}
}