Ability to set autoloads as singleton global variables

This commit is contained in:
reduz
2015-12-28 15:59:20 -03:00
parent 5d47e42eb6
commit e0d21d2158
7 changed files with 137 additions and 12 deletions

View File

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