소스 검색

Improve error message in Node::get_path()

Mitch Curtis 6 년 전
부모
커밋
c332eab864
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      scene/main/node.cpp

+ 1 - 0
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)