How swap child nodes

Godot Version



In Godot I have a node NODE_Y. In this node I have nodeA nodeB and nodeX

In NODE_Y the nodeA index is 0 nodeB is 1 and nodeX is 2

Is it possible to swap child nodes like

nodeB index should be 0 and than nodeA and nodeX comes

Node_Y.move_child(nodeB, 0)
1 Like