Open devMidgard opened 9 years ago
Hello there,
Did you build it as a WebGL app?
I've heard Unity WebGL doesn't support .NET Socket. If so, i guess it's impossible to use websocket-sharp in WebGL apps project.
See also: WebGL Networking
Hi, as you can see in the same page:
" However, if you need networking capabilities beyond the WWW class, it is possible to use Web Sockets or WebRTC, both networking protocols supported by browsers."
Apparently it should support Web Sockets, but what's the difference between .NET WebSockets and others? I am pretty new on every single thing regarding websockets.. Sorry if this sounds stupid, but I'd like a full explanation!
Cheers
2015-06-23 5:07 GMT+02:00 sta notifications@github.com:
Hello there,
Did you build it as a WebGL app?
I've heard Unity WebGL doesn't support .NET Socket. If so, i guess it's impossible to use websocket-sharp in WebGL apps project.
See also: WebGL Networking http://docs.unity3d.com/Manual/webgl-networking.html
— Reply to this email directly or view it on GitHub https://github.com/sta/websocket-sharp/issues/139#issuecomment-114338444 .
However, if you need networking capabilities beyond the WWW class, it is possible to use Web Sockets or WebRTC, both networking protocols supported by browsers.
I think that means it's possible to use WebSocket or WebRTC built in the browsers.
There is no WebSocket module to use in every programing language, but there are some WebSocket protocol implementations in each programing language.
websocket-sharp is written in C#, and based on .NET Socket, but has no relation with WebSocket built in the browsers.
Unity provides a template plugin (also available from the app store) that will use a javascript web socket implementation when running in WebGL, but otherwise if using a non-web application, then it defaults to the C# web socket sharp implementation.
I believe that it is discussed on this page, but I can't get the page to load at the moment: WebGL roadmap
Here is the app store link.
2021, I am still getting that error, not using websocket
Hello there, I've begun to work with WebSockets in C# with this nice plugin thing but I can't seem to get it working, I have a WebSocket Server made in a console application which is working nice, and if I start the client from the Unity Editor it works just fine, it's only when I export to HTML5 (WebGL) that it pops up me an error as soon as the game has loaded.
This is the log:
Invoking error handler due to Uncaught RangeError: Maximum call stack size exceeded
And this is my client code:
using UnityEngine; using System.Collections; using System; using WebSocketSharp;
public class NetworkHandler : MonoBehaviour {
}
Please let me know what am I doing wrong, or if this is something I can't really fix so I can move on!
Thankyu beforehand