0 votes

So, I'm making a character creator. I want the user to be able to pick a bunch of items to put on the character, and download their character once they're done. It works fine when I run it from the editor, but when I export it (to HTML5), the images don't appear.

What I'm doing is opening a folder in the res:// directory and looking for all images in that folder, and then loading them as textures on TextureRects. But it just doesn't work. I don't know why because no error messages are shown.

Also, I exported the project for Windows Desktop and the images don't load there either. But when I save the image and generate a sprite sheet, the images are loaded from paths.

I really don't know what's going on here. Can I not search through a folder for all of its image files? If I can't, what should I do instead?

Edit: I put all of the image names into an array and just looked through that instead, which worked. But is there a better way of doing this?

in Engine by (7,034 points)
edited by

1 Answer

0 votes
Best answer

As it turns out, the imported image files are all stored in the .import folder and I can't find them in the filesystem. But if I pass them through the load() function, it can still load them properly. I guess putting all of the image names into an array worked.

by (7,034 points)
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.