DialogueBox.gd: create array to store buttons, instancing are resource heavy task, do not run it every time you need to update options.
func _ready():
for i in 10:
var button = dialogue_choice_res.instantiate()
button.dialogue_selected.connect(_on_choice_button_down)
button.text = ''
button.choice_id = -1
button.hide()
add_child(button)
choices_buttons.push_back(button)
DialogueBox.gd: create array to store buttons, instancing are resource heavy task, do not run it every time you need to update options.
func _ready():