Skip to content

Clarify that Node.duplicate() duplicates entire subtree recursively#112907

Merged
Repiteo merged 1 commit into
godotengine:masterfrom
Amogh-2404:docs/clarify-node-duplicate-subtree
Nov 18, 2025
Merged

Clarify that Node.duplicate() duplicates entire subtree recursively#112907
Repiteo merged 1 commit into
godotengine:masterfrom
Amogh-2404:docs/clarify-node-duplicate-subtree

Conversation

@Amogh-2404
Copy link
Copy Markdown
Contributor

Fixes #95895

The documentation for Node.duplicate() mentioned that it copies "children" but didn't explicitly state that it duplicates the entire node subtree recursively (all descendants, not just direct children).

This caused confusion for users who didn't expect the method to duplicate child nodes and their children as well. Added a note to clarify this behavior.

@Amogh-2404 Amogh-2404 requested review from a team as code owners November 18, 2025 07:39
@AThousandShips
Copy link
Copy Markdown
Member

This contains unrelated content, please remove this

Comment thread doc/classes/Node.xml Outdated
@Amogh-2404 Amogh-2404 force-pushed the docs/clarify-node-duplicate-subtree branch from 22083fb to 0a27721 Compare November 18, 2025 10:31
@Amogh-2404
Copy link
Copy Markdown
Contributor Author

Updated - removed the unrelated content and simplified the change to just add "recursively" to the existing line as suggested.

@Mickeon
Copy link
Copy Markdown
Member

Mickeon commented Nov 18, 2025

removed the unrelated content

You did not. As of writing, there's still entirely unrelated changes in this PR deriving from #112876.

@Amogh-2404 Amogh-2404 force-pushed the docs/clarify-node-duplicate-subtree branch from 0a27721 to 314e084 Compare November 18, 2025 10:36
@Amogh-2404
Copy link
Copy Markdown
Contributor Author

Done, thanks!

@Repiteo Repiteo modified the milestones: 4.x, 4.6 Nov 18, 2025
@Repiteo Repiteo merged commit d28db79 into godotengine:master Nov 18, 2025
20 checks passed
@Repiteo
Copy link
Copy Markdown
Contributor

Repiteo commented Nov 18, 2025

Thanks! Congratulations on your first merged contribution! 🎉

@akien-mga akien-mga changed the title Clarify that Node.duplicate() duplicates entire subtree recursively Clarify that Node.duplicate() duplicates entire subtree recursively Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs of Node.duplicate don't mention it duplicates whole Node subtree

4 participants