Browse Source

Add a warning on using directory to access of imported files

(cherry picked from commit 4378ef0bb7bec42b20c77cc0709b25cb71fa120a)
skyace65 4 years ago
parent
commit
98caee44f3
1 changed files with 1 additions and 0 deletions
  1. 1 0
      doc/classes/Directory.xml

+ 1 - 0
doc/classes/Directory.xml

@@ -6,6 +6,7 @@
 	<description>
 	<description>
 		Directory type. It is used to manage directories and their content (not restricted to the project folder).
 		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.
 		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:
 		Here is an example on how to iterate through the files of a directory:
 		[codeblock]
 		[codeblock]
 		func dir_contents(path):
 		func dir_contents(path):