Skip to content

Instantly share code, notes, and snippets.

@brettchalupa
Created April 3, 2023 13:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brettchalupa/59dc55ff29d71fec7cb92e929c56a528 to your computer and use it in GitHub Desktop.
Save brettchalupa/59dc55ff29d71fec7cb92e929c56a528 to your computer and use it in GitHub Desktop.
Godot Read from Disk
Hello, world! I'm from an external file.
And I'm a new line!
extends Node2D
func _ready() -> void:
var label_text_res = "res://greeting.txt"
var file = FileAccess.open(label_text_res, FileAccess.READ)
var text = file.get_as_text()
$Label.text = text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment