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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

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:
    426
    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:
    426
    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)