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

Issue with build in Websocket.jslib ( utf8 + runtime ) , Unity 2021.2.7 + Suggestion Fix #180

Closed aedbrault closed 2 years ago

aedbrault commented 2 years ago

Hello, having spent a lot of time on the problem I come here to make my research / my corrections to these problems.

Recently we decided to update to Unity version 2021.2.7 due to some bug fixes. But while generating the compilation in WEBGL we encountered a problem due of Websocket.jslib, I corrected the problem by changing all the Pointer_stringify functions to UTF8ToString and the build was successful. After that I got a new error in my browser console: Exception: RuntimeError: null function or function signature mismatch Still with research. I discovered that this one was due to Runtime which is no longer available, the solution was to replace all the functions Runtime.dynCall. by dynCall. only. And the most no problem, the build works, and so does the websocket part.