[FIXED] Custom ressource working in editor but not when exported

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Michael Dufour

Hello,
I have ennemies and powers dynamically loaded at game launch through custom ressources (.tres)
I have a config file (.cfg) where I list selected powers, and the game selects associated ennemies, so I can make some sort of hero/ennemy rotation every month for example.
I load names, descriptions and an icon image for every power and ennemy through custom ressources.
It’s working great in editor, but when I export, being .exe or html5, absolutely no data is loaded, names are default value, same for description, and there’s no image at all.
The config file is loaded I checked it with a console print, for the icons I imported images as Image in powers and Texture in ennemies but none are showing :frowning:
The weirdest thing is that it’s working fine with the .exe export if I load it in a terminal…(though I want the HTML5 export so…).

Anyone has an idea of what could be wrong ? I know I didn’t post any code yet but as I have no idea what is done wrong I don’t know what part to post.

EDIT : I remade all my images exports as StreamTexture type, then in each resource I made a new StreamTexture and imported the .stex files in it, and still it works perfectly in the editor, but not once exported, I have a “ERROR: No loader found for resource: res://1stCustomResource.tres.remap.” error :frowning:

EDIT 2 : Ok finally found why this error : I’m dynamically loading the resources with a Directory, I didn’t know that Godot was creating some .remap files for the resources at compilation, so I added a
if myResource.get_extension() != “remap”
condition and it’s know working as intended…Man I lost so much time on this all lol.