فهرست منبع

Expand Resource section (#3543)

* Expand Resource section

Added how you can export classes that inherits from Resource as a convenience.
mechPenSketch 5 سال پیش
والد
کامیت
e7a7e11c42
1فایلهای تغییر یافته به همراه7 افزوده شده و 0 حذف شده
  1. 7 0
      getting_started/scripting/gdscript/gdscript_exports.rst

+ 7 - 0
getting_started/scripting/gdscript/gdscript_exports.rst

@@ -125,6 +125,13 @@ Examples
     export(Resource) var resource
     export(Resource) var resource
     # In the Inspector, you can then drag and drop a resource file
     # In the Inspector, you can then drag and drop a resource file
     # from the FileSystem dock into the variable slot.
     # from the FileSystem dock into the variable slot.
+    
+    # Opening the inspector dropdown may result in an
+    # extremely long list of possible classes to create, however.
+    # Therefore, if you specify an extension of Resource such as:
+    export(AnimationNode) var resource
+    # The drop-down menu will be limited to AnimationNode and all
+    # its inherited classes.
 
 
 It must be noted that even if the script is not being run while in the
 It must be noted that even if the script is not being run while in the
 editor, the exported properties are still editable. This can be used
 editor, the exported properties are still editable. This can be used