소스 검색

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

31 1 년 전
부모
커밋
65085d9330
1개의 변경된 파일14개의 추가작업 그리고 1개의 파일을 삭제
  1. 14 1
      tutorials/scripting/c_sharp/c_sharp_exports.rst

+ 14 - 1
tutorials/scripting/c_sharp/c_sharp_exports.rst

@@ -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
 ----------------