diff options
author | reduz <reduzio@gmail.com> | 2015-12-28 15:59:20 -0300 |
---|---|---|
committer | reduz <reduzio@gmail.com> | 2015-12-28 15:59:20 -0300 |
commit | e0d21d2158e8d03ee3139392284915c19ee4619b (patch) | |
tree | ca2614960a86a2c2626365f8afec6ad1291aea95 /scene | |
parent | 5d47e42eb69fcc0d1f502f9b5e72e064cb22d34e (diff) |
Ability to set autoloads as singleton global variables
Diffstat (limited to 'scene')
-rw-r--r-- | scene/main/node.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scene/main/node.cpp b/scene/main/node.cpp index 027e9ace65..2b2a188e76 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -856,7 +856,10 @@ Node *Node::_get_child_by_name(const StringName& p_name) const { Node *Node::_get_node(const NodePath& p_path) const { - ERR_FAIL_COND_V( !data.inside_tree && p_path.is_absolute(), NULL ); + if (!data.inside_tree && p_path.is_absolute()) { + ERR_EXPLAIN("Can't use get_node() with absolute paths from outside the active scene tree."); + ERR_FAIL_V(NULL); + } Node *current=NULL; Node *root=NULL; |