Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Third Party How can i make an online lobby joinable by IP in Mirror

Discussion in 'Multiplayer' started by Antoner_8, Nov 10, 2023.

  1. Antoner_8

    Antoner_8

    Joined:
    Aug 23, 2022
    Posts:
    10
    Searching on the internet ive seen just LAN tutorials of mirror and i dont know if the is a way to connect to other device that is not with same network. I have tried changing networkadress, it works when creating but not when joining , networkadress is the same in the two devices, help pls.
     
  2. Gamemakers3D

    Gamemakers3D

    Joined:
    Dec 8, 2020
    Posts:
    31
    1. windows 10/11 pc firewall settings allow incomming Udp port i guess 7777 and if webgl Tcp Port, and connect from other devices using same router that shares dhcp names and local adresses at lan party
    2. by hosting server also posible through unity 3d editor as Tcp sockets (uncrypted) keep using adresses of lan router in example 192.168.0.101 , not localhost 127.0.0.1 <~~ instances are only monitor share !
    3. Tell us and community? 1 or 2 can help, can you now multiplay with other devices together using mirror in unity 3d, example tanks with lights
    4.optional - mlapi has next level ssl as alternative that ticks --missing-demo-tanks requests community for dev webrtc/sockets and generate crypt certificates to use it in chrome as udp. sry if bug on display type.
     
  3. Antoner_8

    Antoner_8

    Joined:
    Aug 23, 2022
    Posts:
    10
    ok, im using an ip like this example: 192.168.0.101 and when i try to join from other device, it just doesnt join, sorry im very beginner and i dont undertand too much.
     
  4. Antoner_8

    Antoner_8

    Joined:
    Aug 23, 2022
    Posts:
    10
    Create the game script:
    Code (CSharp):
    1.     public void StartGame()
    2.     {
    3.  
    4.         NetworkManager.singleton.networkAddress = GetLocalIPAddress();
    5.  
    6.         NetworkManager.singleton.StartHost();
    7.     }
    Join the game script:
    Code (CSharp):
    1.     public void JoinGame()
    2.     {
    3.         string ipAdress = inputTextJoin.text;
    4.  
    5.         NetworkManager.singleton.networkAddress = ipAdress;
    6.         NetworkManager.singleton.StartClient();
    7.     }
     
  5. Gamemakers3D

    Gamemakers3D

    Joined:
    Dec 8, 2020
    Posts:
    31