mirror of
https://github.com/godotengine/godot.git
synced 2024-12-03 09:52:18 +08:00
Ignore internal children when replacing node
This commit is contained in:
parent
d822fd5322
commit
cd2edfef25
@ -2832,7 +2832,7 @@ void Node::replace_by(Node *p_node, bool p_keep_groups) {
|
||||
}
|
||||
|
||||
Node *parent = data.parent;
|
||||
int index_in_parent = get_index();
|
||||
int index_in_parent = get_index(false);
|
||||
|
||||
if (data.parent) {
|
||||
parent->remove_child(this);
|
||||
|
Loading…
Reference in New Issue
Block a user