Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Help with Network Discovery.

Discussion in 'General Discussion' started by unity_rVDf46PTAEmldA, Jan 6, 2020.

  1. unity_rVDf46PTAEmldA

    unity_rVDf46PTAEmldA

    Joined:
    Aug 27, 2018
    Posts:
    1
    I know that the Network discovery in unity has been deprecated but it is exactly what i need right now.

    I have so far got it work properly. A server broadcasts and the client listens to the broadcast. After it finds the broadcast, i connect to the server by using NetworkManager.singleton.StartClient. This works fine as well.

    Whenever the client is connected the server spawns him in the scene as well.

    Now, my problem is inconsistency. Whenever, i do a StopBroadcast()/ StopClient() or StopServer(), my expectations were that all the network aspects will closed automatically. But, for reason my app runs 4 - 6 times without any problem. Then the client stops discovering the host. To make it work again i have to restart the entire computer or cell phone.

    I think it is because i or unity is not shutting the network stuff properly.

    Would any of you be able to point me to the right direction?
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Reliability has been a problem with Unet's network discovery. Lots of threads on the topic from general unreliability, to issues or outright incompatibility with specific device models. You could search for many of these older threads, but my memory of them is they are full of complaints without solutions. I'd look for a 3rd party implementation if one exists, as there hasn't been fixes in this area of Unet for years and none are coming in the future.