Reading and writing

To read from a file, use the get_as_text or other get_* method:

var file = FileAccess.open("user://save_game.dat", FileAccess.READ)
var player_name = file.get_as_text()
print(player_name)
Comments