I am newish to Godot, and have checked just about everything I can find on this issue, with no luck. I am trying to make a system where when the player does something, a text file appears in the folder that the game is being run from. My code for this is like so:
var __my_file := File.new()
var __my_text := str("test_text")
Then, I call this when I save to the .txt
file.
__my_file.open("res://Test.txt", __my_file.WRITE)
assert(__my_file.is_open())
__my_file.store_string(__my_text)
__my_file.close()
When running the game from the editor, this works totally fine. The text file shows up in the main res://
folder. However, when I export the game, the .txt
file doesn't show up in the folder the .app
is running from, nor any of the surrounding folders. I am using the default MacOS export settings, with *.txt
in the force export line, to no avail. I cannot figure out how to do this.