Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | sygi |
I am iterating over a code and would like to have a quick way for clicking a button in the editor to run some function in a Node. Here’s the code I have:
@tool
@export var run_now: bool = false:
set(value):
my_func()
func my_func():
...
func _process(delta):
if run_now:
my_func()
run_now = false
I can see the “run_now” button in the editor, but clicking it doesn’t lead to the function being called . Is there an easy way to call a function like this from within this node?