| 3473 | } |
| 3474 | |
| 3475 | void Node::queue_free() { |
| 3476 | // There are users which instantiate multiple scene trees for their games. |
| 3477 | // Use the node's own tree to handle its deletion when relevant. |
| 3478 | if (data.tree) { |
| 3479 | data.tree->queue_delete(this); |
| 3480 | } else { |
| 3481 | SceneTree *tree = SceneTree::get_singleton(); |
| 3482 | ERR_FAIL_NULL_MSG(tree, "Can't queue free a node when no SceneTree is available."); |
| 3483 | tree->queue_delete(this); |
| 3484 | } |
| 3485 | } |
| 3486 | |
| 3487 | void Node::set_import_path(const NodePath &p_import_path) { |
| 3488 | #ifdef TOOLS_ENABLED |
no test coverage detected