hi, im trying to send Json object from server to client ,
var sendingInfo = { timer: null, otherPlayersNameAndNumber: [] }
im getting [object object] as a debug.log on unity on websocket.OnMessage, and when i try to deserialize from JSON in OnMessage , i get error from websocket.OnError even though Json match with my class in unity.
I also tried to create an object with JSON.stringify(sendingInfo) on server side and send, however this time i wont get any debug.log from OnMessage.
Edit: Opps ,sorry. by using JSON.stringify(sendingInfo) on server, looks like i was getting debug.log , just logs were messed that is why i couldnt see.
hi, im trying to send Json object from server to client ,
im getting [object object] as a debug.log on unity on
websocket.OnMessage
, and when i try to deserialize from JSON in OnMessage , i get error fromwebsocket.OnError
even though Json match with my class in unity. I also tried to create an object withJSON.stringify(sendingInfo)
on server side and send, however this time i wont get any debug.log from OnMessage.Edit: Opps ,sorry. by using
JSON.stringify(sendingInfo)
on server, looks like i was getting debug.log , just logs were messed that is why i couldnt see.