Unexpected behavior when exporting String var in tool script

Godot Version

4.2.2

Question

I have a String var that I’m exporting from a tool script that sets a child Label’s text using a setter. However in the editor any text I type into the exported String field gets eaten and the Label is only updated with the most recent character I typed. None of what I type stays in the editor field. Is there a reason and/or



workaround for this?

Im assuming the set-method is called everytime you enter a character → the text gets reset with the latest character only as String, because you never set the responseText → responseText is always empty. A workaround could be:

func setLabel(text):
    responseText = text
    Label.text = text
1 Like

That’s exactly it, can’t believe I missed that. Thank you!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.