MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / get_node

Method get_node

scene/main/node.cpp:1930–1945  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1928}
1929
1930Node *Node::get_node(const NodePath &p_path) const {
1931 Node *node = get_node_or_null(p_path);
1932
1933 if (unlikely(!node)) {
1934 const String desc = get_description();
1935 if (p_path.is_absolute()) {
1936 ERR_FAIL_V_MSG(nullptr,
1937 vformat(R"(Node not found: "%s" (absolute path attempted from "%s").)", p_path, desc));
1938 } else {
1939 ERR_FAIL_V_MSG(nullptr,
1940 vformat(R"(Node not found: "%s" (relative to "%s").)", p_path, desc));
1941 }
1942 }
1943
1944 return node;
1945}
1946
1947bool Node::has_node(const NodePath &p_path) const {
1948 return get_node_or_null(p_path) != nullptr;

Callers 15

_node_set_funcMethod · 0.45
_node_call_funcMethod · 0.45
_create_node_funcMethod · 0.45
_instance_node_funcMethod · 0.45
_remove_node_funcMethod · 0.45
_restore_node_funcMethod · 0.45
_duplicate_node_funcMethod · 0.45
_reparent_node_funcMethod · 0.45
_notificationMethod · 0.45
_duplicateMethod · 0.45

Calls 2

vformatFunction · 0.85
is_absoluteMethod · 0.80

Tested by 1

test_directoryFunction · 0.36