When using the Socket.io Unity library events rarely get triggered and only a few of the messages sent from the server are recived.
I'm trying to send values of a potentiometer (between 0 and 99) to my clients. When I change the value, my ESP8266 and Socket.js browser client instantly show all the change in the values. (Notice the many occurances of the values 99 and 0). On the Unity side only a few of the value changes show up (no 0 or 99).
JS console (correct output)
Unity debugger (no 0 or 99 are logged)
What do I have to change in order to reliably recive all the values in Unity as well?
On the Unity side I'm just using the default code with socket.On('Socket.EVENT_MESSAGE'... to log all of the incoming messages. The function call is inside of the DoOpen-function.
When using the Socket.io Unity library events rarely get triggered and only a few of the messages sent from the server are recived. I'm trying to send values of a potentiometer (between 0 and 99) to my clients. When I change the value, my ESP8266 and Socket.js browser client instantly show all the change in the values. (Notice the many occurances of the values 99 and 0). On the Unity side only a few of the value changes show up (no 0 or 99).
JS console (correct output)
Unity debugger (no 0 or 99 are logged)
What do I have to change in order to reliably recive all the values in Unity as well?
My code:
`// Node Server function
socket.on('ESPValueChanged', function(value){ io.sockets.emit('valueForUnity', value) }) `
On the Unity side I'm just using the default code with socket.On('Socket.EVENT_MESSAGE'... to log all of the incoming messages. The function call is inside of the DoOpen-function.