extends Control @onready var container : VBoxContainer = $Container @onready var log_scene : PackedScene = preload("res://scenes/ui/LogMessage.tscn") func _ready() -> void: MessageBus.on_message.connect(_on_message) func _on_message(message : String) -> void: call_deferred("_add_log", message) func _add_log(message : String) -> void: var timestamped_message : String = "[%s] %s" % [ Time.get_time_string_from_system(), message ] var new_log : Label = log_scene.instantiate() container.add_child(new_log) container.move_child(new_log, 0) new_log.set_message(timestamped_message)
or share this direct link: