Is there any way to define nodes _process function from code? Without using external script file?
Now my code is like this:
var process_script = load(“res://src/scripts/music_process.gd”)
var mp = Control.new()
mp.name = MUSIC_PLAYER;
mp.set_script(process_script)
mp.set_process(true)
Globals.ROOT.add_child(mp)
This works, but it would be great to get rid of that externally loaded script file. Process function just tracks music play position. This could be done also with timer, but I think I might need this anyway approach in the some other case too.