Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Dlean Jeans |
I’m implementing an API which has abstract callback function to be overriden
JavaScript.eval('''
api.onConnect = function(device_id) {
// check device
};''')
Is there anyway other way to pass in a Godot function
func _ready():
JavaScript.eval('api.onConnect = %s' % 'emitOnConnect'); # I dunno
function emitOnConnect(device_id):
emit_signal('on_connect', device_id)
without polling with _process
or _physics_process
?