1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-09 12:50:35 +00:00

Improve error message in Node::get_path()

This commit is contained in:
Mitch Curtis
2019-08-07 21:16:54 +02:00
parent 7126654eaf
commit c332eab864

View File

@@ -1668,6 +1668,7 @@ NodePath Node::get_path_to(const Node *p_node) const {
NodePath Node::get_path() 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()); ERR_FAIL_COND_V(!is_inside_tree(), NodePath());
if (data.path_cache) if (data.path_cache)