endel / NativeWebSocket

🔌 WebSocket client for Unity - with no external dependencies (WebGL, Native, Android, iOS, UWP)
Other
1.2k stars 158 forks source link

OnMessage not being invoked #88

Closed sayaranika closed 1 year ago

sayaranika commented 1 year ago

Though the connection works and am able to send messages, OnMessage is not being invoked. So I connected to the server from cmd and a Unity application. When I send message from Unity application, I receive it in cmd. but when I send message from cmd, even the first Debug.Log is not being called. Any idea why this might be?

sayaranika commented 1 year ago

worked after I put the following in the script. Thank you for this amazing package!

`void Update() {

if !UNITY_WEBGL || UNITY_EDITOR

    websocket.DispatchMessageQueue();

endif

}`