Function Node.duplicate
Duplicates the node, returning a new node.
You can fine-tune the behavior using the flags
(see duplicateflags
).
Note: It will not work properly if the node contains a script with constructor arguments (i.e. needs to supply arguments to GodotObject
method). In that case, the node will be duplicated without a script.