| 2181 | } |
| 2182 | |
| 2183 | static 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. |
no test coverage detected