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

Function _find_script_node

editor/script/script_text_editor.cpp:2183–2196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2181}
2182
2183static Node *_find_script_node(Node *p_current_node, const Ref<Script> &script) {
2184 if (p_current_node->get_script() == script) {
2185 return p_current_node;
2186 }
2187
2188 for (int i = 0; i < p_current_node->get_child_count(); i++) {
2189 Node *n = _find_script_node(p_current_node->get_child(i), script);
2190 if (n) {
2191 return n;
2192 }
2193 }
2194
2195 return nullptr;
2196}
2197
2198/// This function prepares a string for being "dropped" into the script editor.
2199/// The string can be a resource path, node path or property name.

Callers 1

drop_data_fwMethod · 0.85

Calls 3

get_scriptMethod · 0.45
get_child_countMethod · 0.45
get_childMethod · 0.45

Tested by

no test coverage detected