Skip to main content
1 of 2
Seph Reed
  • 275
  • 4
  • 10

One way is to pass self into the DilogueSession._init(), like so:

@onready var my_label = $MarginContainer/Panel/Label func display_text(text: String): my_label.set_text(text) func create_dialogue_session(): return DialogueSession.new(self) class DialogueSession: var container_class _init(c_c): container_class = c_c func show_next(): container_class.display_text("the next number is:" + num++) 

I do not believe this is likely to be the best way

Seph Reed
  • 275
  • 4
  • 10