Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notes for Node exports #10396

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jonathandw743
Copy link

Added a note informing of behaviour of Node exports.

@tetrapod00 tetrapod00 added enhancement topic:gdscript area:manual Issues and PRs related to the Manual/Tutorials section of the documentation cherrypick:4.3 labels Dec 10, 2024
Co-authored-by: Max Hilbrunner <[email protected]>
Co-authored-by: Max Hilbrunner <[email protected]>
Node exporting is only supported in Node-derived classes. When a Node is
saved to a PackedScene, using ``Node`` or ``Array[Node]`` will store a
reference to a Node in the scene, but using ``Array`` or ``Dictionary``
to store Nodes will cause a copy of each Node to be created.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the latter is intentional behavior, it's more of an oversight. Although node export is implemented essentially as a hack.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's how it works though and its something people can get tripped up on. Letting people know this is how it works is probably better than ignoring it, at least until the behaviour is changed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We try not to document bugs or behavior that might change without clearly indicating this. Otherwise, users might rely on the behavior and use the documentation as an argument in discussions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:manual Issues and PRs related to the Manual/Tutorials section of the documentation cherrypick:4.3 enhancement topic:gdscript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants