colyseus / colyseus-unity-sdk

⚔ Colyseus Multiplayer SDK for Unity
https://docs.colyseus.io/getting-started/unity-sdk/
MIT License
371 stars 100 forks source link

Implemented parsing of ROOM_DATA_BYTES #228

Closed BG-FraserConnolly closed 1 month ago

BG-FraserConnolly commented 1 month ago

Unity clients can now receive data sent from the server using client.sendBytes.

For a Unity client to register a call back for a message sent to it by the server using SendBytes, call RoomController OnMessage with the type byte[ ]

endel commented 1 month ago

Thank you for the PR @BG-FraserConnolly 💜

BG-FraserConnolly commented 1 month ago

Thanks for the quick approval @endel but I'm afraid I made a small mistake.

line 506 should be: else if (code == ColyseusProtocol.ROOM_DATA || code == ColyseusProtocol.ROOM_DATA_BYTES)

I missed out the second code == when copying from my project to the pull request.

Do you want me to make a new pull request? Should this one be reverted?

endel commented 1 month ago

Hi @BG-FraserConnolly, can you send another PR please? That was an oversight from me as well

BG-FraserConnolly commented 1 month ago

@endel, Okay, I've submitted #229

endel commented 1 month ago

Thanks!