Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | redsharktooth22 |
Hi, I’m working on a game for the github gameoff challenge and I started to experiment with uploading my game to itch.io.
The current sourcecode is here: GitHub - pastra98/DriveMeInsane
Problem
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.
Context
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
.