[Unity] 如何解決 BestHttp出WebGL 會發生的問題
使用 BestHttp 套件後,Build WebGL ,會出現以下錯誤, Assets/Best HTTP (Pro)/Examples/Websocket/WebSocketSample.cs(68,31): error CS1061: Type `BestHTTP.WebSocket.WebSocket' does not contain a definition for `StartPingThread' and no extension method `StartPingThread' of type `BestHTTP.WebSocket.WebSocket' could be found. Are you missing an assembly reference? 這時記得把 BestHttp 下的 WebSocketSample.cs 檔案中的68行 webSocket.StartPingThread = true; 移入到 !UNITY_WEBGL 之下, 如下圖所示