瀏覽代碼

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;
         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
 .. code-block:: csharp
 
 
@@ -81,6 +83,17 @@ Resources and nodes can be exported.
     [Export]
     [Export]
     public Node Node { get; set; }
     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
 Grouping exports
 ----------------
 ----------------