summaryrefslogtreecommitdiffstats
path: root/scene/main/node.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/main/node.cpp')
-rw-r--r--scene/main/node.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 884fc6de07..c6e5a4603e 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -2583,6 +2583,7 @@ void Node::get_storable_properties(HashSet<StringName> &r_storable_properties) c
}
String Node::to_string() {
+ // Keep this method in sync with `Object::to_string`.
ERR_THREAD_GUARD_V(String());
if (get_script_instance()) {
bool valid;
@@ -2591,7 +2592,12 @@ String Node::to_string() {
return ret;
}
}
-
+ if (_get_extension() && _get_extension()->to_string) {
+ String ret;
+ GDExtensionBool is_valid;
+ _get_extension()->to_string(_get_extension_instance(), &is_valid, &ret);
+ return ret;
+ }
return (get_name() ? String(get_name()) + ":" : "") + Object::to_string();
}