If I test it in editor all works as intended and I can start as a host, scene works as expected.
But when I build it I get this error in browser console: "SocketException: Success at System.Net.Sockets.Socket…ctor (System.Net.Sockets.AddressFamily addressFamily, System.Net.Sockets.SocketType socketType, System.Net.Sockets.ProtocolType protocolType) [0x00000] in <00000000000000000000000000000000>:0 "
why does this happen?
I tryed to disable windows defender firewall too but nothing changes.
I’m testing also on other built projects with the same netcode version and same transport version and i get the same error.
Have you tried building a development / debug mode build with full stacktrace (see Player Settings)? You may get more detailed info on this. Hopefully it will be more informative than “successfully failed”.
I have not seen that “Path” setting in the WebSocket transport. You entered “/netcode” which may or may not be correct. Just a stomach feeling, maybe check the documents on that again. I sense this is supposed to indicate the app is deployed to “https://the.webserver.domain/netcode” - is that so?
If you use Netcode 1.8 or later WebSockets support is integrated and only needs to be enabled in the NetworkManager / UnityTransport Inspector.
Oh, hmm … did I overlook this in the original post?
If the intention is to HOST a game in WebGL, this is not possible!
WebSockets does not allow incoming connections, it is a client-only transport due to browser security restrictions.