Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Relay and Multiplay for WebGL

Discussion in 'Relay' started by MQBVik, Sep 8, 2023.

  1. MQBVik

    MQBVik

    Joined:
    Aug 14, 2023
    Posts:
    2
    Would it be possible and wise to use Relay together with dedicated game servers running on Multiplay so that the servers communicate with Relay via UPD/TCP and the clients communicate with Relay via WSS?

    I am considering this as a solution for not being able to connect to a dynamic ip and not a domain name from WebGL using WSS.
     
  2. simon-lemay-unity

    simon-lemay-unity

    Unity Technologies

    Joined:
    Jul 19, 2021
    Posts:
    359
    Yes! That would work. Currently it's even our recommended solution if you want WebGL clients to connect securely to a dedicated server running on Multiplay. We're aware that this is not ideal however (ideally Multiplay would provide certificates that can be used to create secure servers), but until there's a better solution in place, your best bet is to use Relay.
     
    MQBVik likes this.
  3. MQBVik

    MQBVik

    Joined:
    Aug 14, 2023
    Posts:
    2
    In case anyone is wondering we implemented this. It was easy to implement and it works well. We use Lobby for sharing the join code. Thanks again @simon-lemay-unity .
     
    simon-lemay-unity likes this.