浏览代码

Add a warning on using directory to access of imported files

(cherry picked from commit 4378ef0bb7bec42b20c77cc0709b25cb71fa120a)
skyace65 4 年之前
父节点
当前提交
98caee44f3
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      doc/classes/Directory.xml

+ 1 - 0
doc/classes/Directory.xml

@@ -6,6 +6,7 @@
 	<description>
 		Directory type. It is used to manage directories and their content (not restricted to the project folder).
 		When creating a new [Directory], its default opened directory will be [code]res://[/code]. This may change in the future, so it is advised to always use [method open] to initialize your [Directory] where you want to operate, with explicit error checking.
+		[b]Note:[/b] Many resources types are imported (e.g. textures or sound files), and their source asset will not be included in the exported game, as only the imported version is used. Use [ResourceLoader] to access imported resources.
 		Here is an example on how to iterate through the files of a directory:
 		[codeblock]
 		func dir_contents(path):