Get a list of resources

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ugly_cat
:warning: Old Version Published before Godot 3 was released.

I have a folder full of random msh files in res://meshes. How do I get a list of all these meshes? I’m trying to randomly assign one of these meshes to a mesh instance. There are over 800 different meshes so manually assigning them is out of the question.

:bust_in_silhouette: Reply From: Daniel Lewan

Use Directory class to get a list of files in res://meshes. Then load random one.

I though this was limited to stuff outside of the resource folder, thanks!

ugly_cat | 2016-12-16 20:18