Merge pull request #31185 from mitchcurtis/get_path

Improve error message in Node::get_path()
This commit is contained in:
Rémi Verschelde 2019-08-08 14:05:49 +02:00 committed by GitHub
commit 4d7439adaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)