I’m using websocket extension along with colyseus library. Sometimes I need to keep the connected room which created from a script and reuse it in another script. I tried many ways but it seems impossible. Looks like the setup callback API only accept if the callback function is the same script context with the room variable.
ERROR:WEBSOCKET: Failed to setup callback
I don’t want to close and recreate the connection.
Is there a way to change the variable’s context to the current script? Or allow to setup callback on a different script?