mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-03 05:48:42 +03:00
c_sharp_exports.rst: clarify why exporting nodes/resources is useful
This commit is contained in:
@@ -71,7 +71,9 @@ Exported members can specify a default value; otherwise, the `default value of t
|
||||
set => _greeting = value;
|
||||
}
|
||||
|
||||
Resources and nodes can be exported.
|
||||
Resources and nodes can be exported. The property editor shows a user-friendly
|
||||
assignment dialog for these types. This can be used instead of ``GD.Load`` and
|
||||
``GetNode``.
|
||||
|
||||
.. code-block:: csharp
|
||||
|
||||
@@ -81,6 +83,17 @@ Resources and nodes can be exported.
|
||||
[Export]
|
||||
public Node Node { get; set; }
|
||||
|
||||
Exporting a specific type of resource or node lets the property editor show a
|
||||
filtered list of possibilities.
|
||||
|
||||
.. code-block:: csharp
|
||||
|
||||
[Export]
|
||||
public PackedScene PackedScene { get; set; }
|
||||
|
||||
[Export]
|
||||
public RigidBody2D RigidBody2D { get; set; }
|
||||
|
||||
Grouping exports
|
||||
----------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user