+1 vote

Hi all,

I have a level editor I've setup. As I create new images I want to drop them into a folder, say called "sprites" and then press "refresh" in my editor and all the images are found, turned into sprites.

I think I can handle most of the bits surrounding that but I'm stuck on actually grabbing all the filenames in a folder.

Does anyone have a suggestion as to where I can research this further? I couldn't find anything in the OS or file section of the docs that made sense to me regarding this.

Thanks so much...

in Engine by (824 points)

1 Answer

+4 votes
Best answer
by (5,200 points)
selected by

You legend! There it was all along. Directory class. Thank you so much. That's almost a copy/paste for what I'm after and it's really simple to understand. Thanks again.

No problem. X)

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.