Problem about unity 5 WebGL build
Posted: 25 May 2015, 10:27
Hi, i have a project uses smartfoxserver 2x, previously the project is build based on WebPlayer platform, everything works perfectly, recently my boss ask me to port the project to WebGL, here came the problem.
I tried to:
Updated unity from 5.0.0 to 5.0.2f1
Updated the server api from 2.9 to 2.10
Reconfigured the SmartFoxServer by using admin tool: activated the WebSocket Protocol under "HTML5 WebSockets" tab, and made sure the port is 8888.
Updated c# client api to 1.6.0:
-Replaced the old SmartFox2x.dll with the SmartFox2x.dll located in "Unity" folder, set the plugin platform to all platform except WebGL.
-Created a new folder named "WebGL" and put "SmartFox2x.dll" and "SFSWebSockets.jslib" into the folder, and then set the two files's platform to WebGL.
-Changed the smartfox object constructor from "new SmartFox ()" to "new SmartFox (Sfs2X.Util.UseWebSocket.WS)".
-Changed the connection port to 8888.
then i built the project, output it as WebGL files, put to the webserver, then tried to run.
When i clicked login button in my client application, this error occurs in the web console: "WebSocket connection to 'ws://175.138.67.209:8888/websocket' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED , [SFS - ERROR] [WebSocketLayer] Connection error: Abnormal disconnection.".
then i tired to click again, this error prompt out on the top of browser: "Uncaught RangeError: Maximum call stack size exceeded", then i check the web console, this error occurs " exception thrown: RangeError: Maximum call stack size exceeded,RangeError: Maximum call stack size exceeded".
can anyone help me? i need to solve this issue urgently, thanks.
I tried to:
Updated unity from 5.0.0 to 5.0.2f1
Updated the server api from 2.9 to 2.10
Reconfigured the SmartFoxServer by using admin tool: activated the WebSocket Protocol under "HTML5 WebSockets" tab, and made sure the port is 8888.
Updated c# client api to 1.6.0:
-Replaced the old SmartFox2x.dll with the SmartFox2x.dll located in "Unity" folder, set the plugin platform to all platform except WebGL.
-Created a new folder named "WebGL" and put "SmartFox2x.dll" and "SFSWebSockets.jslib" into the folder, and then set the two files's platform to WebGL.
-Changed the smartfox object constructor from "new SmartFox ()" to "new SmartFox (Sfs2X.Util.UseWebSocket.WS)".
-Changed the connection port to 8888.
then i built the project, output it as WebGL files, put to the webserver, then tried to run.
When i clicked login button in my client application, this error occurs in the web console: "WebSocket connection to 'ws://175.138.67.209:8888/websocket' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED , [SFS - ERROR] [WebSocketLayer] Connection error: Abnormal disconnection.".
then i tired to click again, this error prompt out on the top of browser: "Uncaught RangeError: Maximum call stack size exceeded", then i check the web console, this error occurs " exception thrown: RangeError: Maximum call stack size exceeded,RangeError: Maximum call stack size exceeded".
can anyone help me? i need to solve this issue urgently, thanks.