I'm a bit new to Godot, so please excuse my ignorance if the solution is rather simple, but I've created a program where one of the features changes the texture of a Polygon2D
node by pulling from an array of textures. This array is built by looping through a specific FileSystem folder and appending each *.png
into the array variable.
FileSystem Folder: https://imgur.com/0wbXKtM

The TextureLoader Function: https://imgur.com/a/KQ1gNX8

Calling the TextureLoader Function: https://imgur.com/a/EWyLeuJ

When running this in the Editor, the texture array is created and works properly; however when exported, it looks like the program has trouble finding the folders because the texture array remains empty.
Print Statement of TextureArray in Editor after running TextureLoader: https://imgur.com/H5eZx3o

Print Statement of TextureArray in Exported File after running TextureLoader: https://imgur.com/OXlHCDS

I've looked into this issue and found other folks had a similar problem, solving it through explicitly calling the files/folders in the Resources
tab on the Export
Window. Yet I've tried calling the files (*.png
), calling the directory (BilletController/*
, res://BilletController/*
, & user://BilletController/*
), and tried copying the resource folder into the same folder with the *.exe
& *.pck
files; yet none worked.
My References:
https://godotengine.org/qa/47956/export-not-including-non-resource-files
https://godotengine.org/qa/2575/some-resource-files-are-not-exported
https://godotengine.org/qa/71057/cannot-iterate-non-resource-files-in-the-directory-the-build
https://godotforums.org/discussion/24633/including-non-resource-files-in-export
https://github.com/godotengine/godot/issues/17053
With all that being said...
...am I missing something? Through my research, I saw some mention of a ResourceLoader
, would that play a part in this? Any advice would be appreciated.
(_ _;;)
EDIT:
On further inspection, I confirmed that the *.png
files weren't actually being exported and only the *.png.import
files, even when I explicitly called the file type and the folder within the Export
window:
Print Statement listing all files in the FileSystem Folder: https://imgur.com/bIcCZBN

Export Window with Non-Resource Call: https://imgur.com/wEazhGR

Print Statement listing all the files in the FileSystem Folder: https://imgur.com/Yt316M2
