Search Unity

Resolved multiplayer-community-contributions Network Discovery Issues

Discussion in 'Netcode for GameObjects' started by skhan2523, May 18, 2023.

  1. skhan2523

    skhan2523

    Joined:
    May 26, 2016
    Posts:
    16
    Last edited: May 18, 2023
  2. RikuTheFuffs-U

    RikuTheFuffs-U

    Unity Technologies

    Joined:
    Feb 20, 2020
    Posts:
    440
    Hi, what NGO version are you using? From the documentation, it seems NetworkDiscovery was compatible until 1.0.0
     
  3. skhan2523

    skhan2523

    Joined:
    May 26, 2016
    Posts:
    16
    Hey there, I am using 1.4.0 NGO, and I wrote my own solution simple UDP broadcast and listening. The problem was that the client was not getting connected to the server because some how server was not getting the correct endpoint. so I used SetConnectionData and now it is working.
     
    RikuTheFuffs-U likes this.
  4. RikuTheFuffs-U

    RikuTheFuffs-U

    Unity Technologies

    Joined:
    Feb 20, 2020
    Posts:
    440
    Awesome! Where are you using SetConnectionData? Is there an example you can share, for future reference?
     
  5. skhan2523

    skhan2523

    Joined:
    May 26, 2016
    Posts:
    16
    Yeah so just before I call
    NetworkManager.Singleton.StartServer();
    , I use
    SetConnectionData(ipAddress, (ushort)port)