mirror of
https://github.com/godotengine/godot.git
synced 2024-11-27 09:16:35 +08:00
Improve error message in Node::get_path()
This commit is contained in:
parent
7126654eaf
commit
c332eab864
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user