浏览代码

Merge pull request #31185 from mitchcurtis/get_path

Improve error message in Node::get_path()
Rémi Verschelde 6 年之前
父节点
当前提交
4d7439adaa
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      scene/main/node.cpp

+ 1 - 0
scene/main/node.cpp

@@ -1665,6 +1665,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)