Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | codevanya |
Suppose I have a Button node. I attached a script like this to it:
tool
extends Button
export(String) var num
var _init():
self.set_text(num)
Now, I want the button text to be updated in the editor automatically as I update the exported variable in the inspector (either instantly or after I save the scene). The above script is not working for me. I guess the value in the exported variable is not yet available when _init()
is called.
Beats me. I find no mention of init in the room documentation. Did your code work if you put it into ready or process functions?
StopNot | 2021-07-04 19:07