- Edited
I'm trying to save some variable to a file. I used .dat file but Godot didn't import it in the project files. So upon export, it just didn't work. I tried .txt format, and Godot does import it, but I have to add *.txt to Resources upon exporting the project. I want my module to work without the need to change any settings...
So I tried .res file. But every time I open the project, it says:
"Unrecognized binary resource file: res://Sender-Receiver System/sender_list.res."
However it does import it, and it does work perfectly, even in the exported project.
I suppose the reason for the error is that I'm using the FileAccess. Here's the code:
var path = get_script().get_path().get_base_dir()+"/sender_list.res"
var file = FileAccess.open(path, FileAccess.WRITE)
file.store_var(SenderList)
file.close()
SenderList is an array.
What am I supposed to do? The .res file DOES work, but gives that nasty error. The other file formats need to manually be added to the list of files upon exporting the project.
I want to be able to use my system by just dragging and dropping the folder, wihout the need for additional changes in the settings...