From c332eab86481e95fa24c967b9de14293ae34e29e Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Wed, 7 Aug 2019 21:16:54 +0200 Subject: Improve error message in Node::get_path() --- scene/main/node.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'scene') diff --git a/scene/main/node.cpp b/scene/main/node.cpp index caa0da5d1f..b74d6849c1 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -1668,6 +1668,7 @@ NodePath Node::get_path_to(const Node *p_node) const { NodePath Node::get_path() const { + ERR_EXPLAIN("Cannot get path of node as it is not in a scene tree"); ERR_FAIL_COND_V(!is_inside_tree(), NodePath()); if (data.path_cache) -- cgit v1.2.3