Hi, I'm working on a card game, with a certain amount of cards that can change as the development process progresses.
All the card images are in a forlder inside the project, I made a card object which I instance and store dinamically as many times as images I have, and inject the image at creation time using the load() method.
Everything works fine on the editor, but once I Export, the game doesn't seem to find the images, except the one I manually added to the card object scene as a working reference.
this makes me think that the engine isn't aware that it should export these resources, I added the .jpg extension an the path/folder/to/images/ to the exporter filters, and made sure that the path to the res folders is correct. how can I export the images to be recognized?
As a side note: when I collect the files using ".jpg.import" in my code's conditional instead of ".jpg", it finds the files but can't iterpret them, which I guess must be normal.
here's also a bit of the relevant parts of my code. Thank you in advance for your help, I have tried a bunch of things and nothing seems to work.
Collecting the files:
var files:Array = 
var dir:Directory = Directory.new()
var safecounter:int = 0
while true and safecounter<500:
var file:String = dir.get_next()
if file == "":
print("safecounter: =" + String(safecounter))
elif not file.begins_with("."):
Loading the data from the filePaths:
var tempcardspath:Array = list_files_in_directory(cardsDir,"jpg")#jpg.import
var tempCards:Array = 
for tempcard in tempcardspath:
var thisCard:String = tempcard
var card:Card = cardObj.instance()
var imagePath:String = cardsDir+tempcard
var cardTexture:Texture = load(imagePath)
var cardID:String = (thisCard.split("_",false,1)).split(".",false,1)
card.cardID = cardID
card.cardImage = cardTexture
paths to card object and to the images:
var cardsDir:String = "res://Art/Cards/MainDeck/"
onready var cardObj:PackedScene = preload("res://Scenes/Card.tscn")