mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Provide a reliable way to see original resources in a directory
When exporting a project, resources are often moved, converted or
remapped (source import files are gone, text scenes are converted to binary,
etc).
This new function allows to list a directory and obtain the actual original
resource files.
Example
```GDScript
var resources = ResourceLoader.list_directory("res://images")
print(resources)
```
Result will be something like:
```
["image1.png","image2.png","image3.png"]
```
instead of
```
["image1.png.import","image2.png.import","image3.png.import"]
```
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>
|
||||
|
||||
Reference in New Issue
Block a user