mikerochip / unity-websocket

Easy-to-use WebSocket MonoBehaviour for Unity. NativeWebSocket alternative.
Other
54 stars 7 forks source link

Can't compile #9

Closed alters-mit closed 12 months ago

alters-mit commented 12 months ago

I'm using Unity 2020.3.24. This is an old project and I can't upgrade the engine.

unity-websocket fails to compile to a WebGL build unless I replace lines like this:

console.log('[JSLIB WebSocket] Received message: ${ev.data}`);

to lines line this:

console.log("[JSLIB WebSocket] Received message: ${ev.data}");

in WebSocket.jslib

mikerochip commented 12 months ago

Hello. I think you might have some copy paste errors? Are you replacing the backticks with double quotes?

I recently bumped the minimum version to 2021.2 but I can take a look at downgrading back to 2019.3

alters-mit commented 12 months ago

Edited with better copy-pasting

mikerochip commented 12 months ago

Thanks for bringing up this issue. Other than weird hacks I had to do to get my test project to build WebGL on Mac with Unity 2019.4, it was a pretty straightforward change to this package to support that version as the new minimum.