Add a warning on using directory to access of imported files

(cherry picked from commit 4378ef0bb7)
This commit is contained in:
skyace65 2021-03-27 13:12:07 -04:00 committed by Rémi Verschelde
parent 92b27e4944
commit 98caee44f3
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -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):