This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

Hi, I'm working on a game for the github gameoff challenge and I started to experiment with uploading my game to
The current sourcecode is here:

Once the project is exported to html5, stuff like TextureRect.texture = load(ressourcepath) does not work anymore on itch. Same with audiostreams.

My understanding & stuff I tried
I understand this has to do with the generated PCK file being a virtual filepath, I saw that on this github answer. Reduz recommends to use load() (like I currently do?) and import the file as an image. I tried reimporting the image by reimporting as Image instead of Texture in the import panel of the .png files. After reimporting, the images don't show at all.

I also tried ProjectSettings.globalize_path(filepath) to no avail.

I have implemented a system where everything about game characters is defined in a cfg file (e.g. /src/passengers/ressources/bob/bob.cfg). Then the passenger class is initialized with the correct name and loads the information. It stores an imagepath in the ressource format e.g. res://passengers/ressources/merlin/merlin_angry.png.

Godot version 3.5.1
in Engine by (28 points)

1 Answer

0 votes
Best answer

My bad, the filepaths had the wrong capitalization (I used a string format with the characters name which is in caps - unlike the actual file which is lowercase). This also caused troubles with the normal compiled file. load(respath) now works again.

Thanks Nisovin from discord!

by (28 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 Frequently asked questions and 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 [email protected] with your username.