immersive-home/app/lib/globals/console.gd
2024-04-30 19:18:49 +02:00

18 lines
339 B
GDScript

extends Node
const console_scene = preload ("res://content/ui/console.tscn")
@onready var main = $"/root/Main"
@onready var console = $"/root/Main/Console"
func _ready():
await main.ready
main.remove_child(console)
func log(message):
print(message)
if console.get_parent() == null:
main.add_child(console)
console.log(message)