소스 검색

Merge pull request #8860 from 31/dev/31/export-node-res-useful

c_sharp_exports.rst: clarify why exporting nodes/resources is useful

(cherry picked from commit 654ee26ffeec857810670eb7c82598f70e8b26ef)
Matthew 1 년 전
부모
커밋
0f652294c5
1개의 변경된 파일7개의 추가작업 그리고 3개의 파일을 삭제
  1. 7 3
      tutorials/scripting/c_sharp/c_sharp_exports.rst

+ 7 - 3
tutorials/scripting/c_sharp/c_sharp_exports.rst

@@ -71,15 +71,17 @@ Exported members can specify a default value; otherwise, the `default value of t
         set => _greeting = value;
     }
 
-Resources and nodes can be exported.
+Any type of ``Resource`` or ``Node`` 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``. See :ref:`Nodes and Resources <doc_c_sharp_exports_nodes>`.
 
 .. code-block:: csharp
 
     [Export]
-    public Resource Resource { get; set; }
+    public PackedScene PackedScene { get; set; }
 
     [Export]
-    public Node Node { get; set; }
+    public RigidBody2D RigidBody2D { get; set; }
 
 Grouping exports
 ----------------
@@ -241,6 +243,8 @@ Color given as red-green-blue value (alpha will always be 1).
     [Export(PropertyHint.ColorNoAlpha)]
     private Color Color { get; set; }
 
+.. _doc_c_sharp_exports_nodes:
+
 Nodes
 -----