mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 06:11:29 +03:00
Added Node name to print() when printing Nodes.
(cherry picked from commit 3ca25ffe8a)
This commit is contained in:
@@ -1866,6 +1866,18 @@ Node *Node::get_deepest_editable_node(Node *p_start_node) const {
|
||||
return node;
|
||||
}
|
||||
|
||||
String Node::to_string() {
|
||||
if (get_script_instance()) {
|
||||
bool valid;
|
||||
String ret = get_script_instance()->to_string(&valid);
|
||||
if (valid) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return (get_name() ? String(get_name()) + ":" : "") + Object::to_string();
|
||||
}
|
||||
|
||||
void Node::set_scene_instance_state(const Ref<SceneState> &p_state) {
|
||||
data.instance_state = p_state;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user