Skip to content

Commit 654ee26

Browse files
authored
Merge pull request godotengine#8860 from 31/dev/31/export-node-res-useful
c_sharp_exports.rst: clarify why exporting nodes/resources is useful
2 parents 30a95a3 + 7c344c5 commit 654ee26

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tutorials/scripting/c_sharp/c_sharp_exports.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,17 @@ Exported members can specify a default value; otherwise, the `default value of t
7171
set => _greeting = value;
7272
}
7373
74-
Resources and nodes can be exported.
74+
Any type of ``Resource`` or ``Node`` can be exported. The property editor shows
75+
a user-friendly assignment dialog for these types. This can be used instead of
76+
``GD.Load`` and ``GetNode``. See :ref:`Nodes and Resources <doc_c_sharp_exports_nodes>`.
7577

7678
.. code-block:: csharp
7779
7880
[Export]
79-
public Resource Resource { get; set; }
81+
public PackedScene PackedScene { get; set; }
8082
8183
[Export]
82-
public Node Node { get; set; }
84+
public RigidBody2D RigidBody2D { get; set; }
8385
8486
Grouping exports
8587
----------------
@@ -241,6 +243,8 @@ Color given as red-green-blue value (alpha will always be 1).
241243
[Export(PropertyHint.ColorNoAlpha)]
242244
private Color Color { get; set; }
243245
246+
.. _doc_c_sharp_exports_nodes:
247+
244248
Nodes
245249
-----
246250

0 commit comments

Comments
 (0)