I'm building a simple character creator.
The character is its own scene, with each customizable part being a sprite with a script attached. In the script I have a function which imports all files in a given path, and stores the files in an array - so for example the hair:
The directory contains a around 5-6 png files with different color variations of the hair. File 1 is
array, file 2 is
array, and so on.
I then have a button in the main scene which will increment the array index by one, and apply the texture. (it loops back to 0 if it goes too far).
This works well when I run the project from the editor, however if I run the exported exe, the files are not imported and the array will be empty, throwing the error in the screenshot. I've tried exporting all files in the project but I still have the same issue.
Any idea whats going on here?