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 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tutorials/scripting/gdscript/gdscript_exports.rst
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,13 @@ without having to use NodePaths:
# Custom classes declared with `class_name` can also be used.
@export var some_button: BaseButton

.. note::

Node export 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.

Exporting NodePaths like in Godot 3.x is still possible, in case you need it:

::
Expand Down