File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
tutorials/scripting/gdscript Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -248,6 +248,17 @@ It must be noted that even if the script is not being run while in the
248
248
editor, the exported properties are still editable. This can be used
249
249
in conjunction with a :ref: `script in "tool" mode <doc_gdscript_tool_mode >`.
250
250
251
+ .. note ::
252
+
253
+ Using ``@export `` variables for :ref: `Resource <class_Resource >` objects
254
+ makes them a dependency of the script, meaning that all the resources
255
+ referenced by ``@export `` variables are loaded when the scene
256
+ containing the script is instantiated. If you want to reference a
257
+ :ref: `Resource <class_Resource >` object but load it manually when you need
258
+ it (which, for example, is often the case for
259
+ :ref: `PackedScenes <class_PackedScene >` containing a whole level), use
260
+ ``@export_file `` instead.
261
+
251
262
Exporting bit flags
252
263
-------------------
253
264
You can’t perform that action at this time.
0 commit comments