#after exporting a project godot renames resources with .remap suffix

14 messages · Page 1 of 1 (latest)

dawn robin
#

and because of this i cant instantiate a scene from a file path. what do i even do about this?
i know the workaround about removing the .remap suffix but it kinda sounds lame....

hoary glacier
#

but well i don't really understand why you have a problem with removing .remap. i mean i also don't understand why that conversion even exists, but just using 1 additional String operation when checking file paths doesn't sound too tedious.

dawn robin
hoary glacier
# dawn robin i dont know. renaming files back just feels kinda wrong. so i was thinking maybe...

i guess the intended "solution" is to just not search inside the resource directory during the game and have all the paths presaved. you are correct about this feeling wrong, as its often stated you shouldn't use "dynamic load methods" like load() during the exported game as they supposedly don't work anymore (at least with that setting turned on). i however weren't able to find any issue aside from the shown filenames not being identical to the ones you have to use to load them.

remote warren
#

btw since 4.4 you can use ResourceLoader.list_directory() instead of DirAccess, the ResourceLoader one will already return loadable resource paths (+ directories) without extra string mangling needed

#

I think that's the more intended solution since it will preserve behavior between editor and export, and also it will work with even imported resources

hoary glacier
#

so that's probably the intended way to do it at the moment.

dawn robin
dawn robin
remote warren
#

if you strip the .remap yourself, that's the old workaround

#

still works since that hasn't changed in a long time and there's no plans to change it, but list_directory is supposed to keep up with changes if they're made

dawn robin