NativeWebSocket
NativeWebSocket copied to clipboard
Support WebAssembly.Table
Module.dynCall does not work in Unity 6 with WebAssembly.Table enabled (which is forced on if targeting WebAssembly 2023), and according to this, it should be replaced with an Emscripten macro {{{ makeDynCall(...) }}}(...);
However, since this syntax isn't supported by all older versions of Unity, to keep this backwards compatible I use a conditional if (typeof dynCall != 'undefined') to use the old syntax if dynCall is available.