immersive-home/app/content/ui/ui_console.gd
2024-04-30 19:18:49 +02:00

15 lines
267 B
GDScript

extends StaticBody3D
@onready var label = $Label3D
var max_message = 30
var messages: Array = ["aaa", "bbb"]
func log(text: Variant) -> void:
messages.append(str(text))
if messages.size() > max_message:
messages.pop_front()
label.text = "\n".join(messages)