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?