Hello,
trying to use the new Multiplayer Services with the “WithRelayNetwork()” session options extensions do not work for me in a corporate network. I would need to set custom relay server connection settings (like different port).
How can I do this? Seems I can’t adjust relay related options at all with the new approach.
Okay I think I found a possible solution.
The relay server could be working via WebSockets.
Problem though: When activating WebSockets in UnityTransport the Relay server don’t work anymore because it uses DTLS in Desktop/Windows.
I found the method deciding for the RelayServer connection which connection type to choose in ConnectionModule.cs of MultiplayerServices:
static string SecurePlatformConnectionType()
{
#if UNITY_WEBGL
return MPConstants.WSS;
#else
return MPConstants.DTLS;
#endif
}
WSS would then use websockets which is only the case in WebGL.
So please @Unity, fetch if WebSockets is being used by looking to the UnityTransport or at least let the user/developer decide by adding an additional SessionProperty to adjust this.