Merge pull request #96590 from reduz/list-directory
Provide a reliable way to see original resources in a directory
This commit is contained in:
@@ -60,6 +60,7 @@
|
||||
}
|
||||
[/csharp]
|
||||
[/codeblocks]
|
||||
Keep in mind that file names may change or be remapped after export. If you want to see the actual resource file list as it appears in the editor, use [method ResourceLoader.list_directory] instead.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="File system">$DOCS_URL/tutorials/scripting/filesystem.html</link>
|
||||
|
||||
@@ -74,6 +74,13 @@
|
||||
Once a resource has been loaded by the engine, it is cached in memory for faster access, and future calls to the [method load] method will use the cached version. The cached resource can be overridden by using [method Resource.take_over_path] on a new resource for that same path.
|
||||
</description>
|
||||
</method>
|
||||
<method name="list_directory">
|
||||
<return type="PackedStringArray" />
|
||||
<param index="0" name="directory_path" type="String" />
|
||||
<description>
|
||||
Lists a directory (as example: "res://assets/enemies"), returning all resources contained within. The resource files are the original file names as visible in the editor before exporting.
|
||||
</description>
|
||||
</method>
|
||||
<method name="load">
|
||||
<return type="Resource" />
|
||||
<param index="0" name="path" type="String" />
|
||||
|
||||
Reference in New Issue
Block a user