Returns [code]true[/code] if the [NodePath] points to a valid node and its subname points to a valid resource, e.g. [code]Area2D/CollisionShape2D:shape[/code]. Properties with a non-[Resource] type (e.g. nodes or primitive math types) are not considered resources.
ERR_FAIL_COND_MSG(p_child==this,vformat("Can't add child '%s' to itself.",p_child->get_name()));// adding to itself!
ERR_FAIL_COND_MSG(p_child->data.parent,vformat("Can't add child '%s' to '%s', already has a parent '%s'.",p_child->get_name(),get_name(),p_child->data.parent->get_name()));//Fail if node has a parent
#ifdef DEBUG_ENABLED
ERR_FAIL_COND_MSG(p_child->is_a_parent_of(this),vformat("Can't add child '%s' to '%s' as it would result in a cyclic dependency since '%s' is already a parent of '%s'.",p_child->get_name(),get_name(),p_child->get_name(),get_name()));
ERR_FAIL_COND_MSG(p_child->is_ancestor_of(this),vformat("Can't add child '%s' to '%s' as it would result in a cyclic dependency since '%s' is already a parent of '%s'.",p_child->get_name(),get_name(),p_child->get_name(),get_name()));
#endif
ERR_FAIL_COND_MSG(data.blocked>0,"Parent node is busy setting up children, add_node() failed. Consider using call_deferred(\"add_child\", child) instead.");