private void NetworkDiscovery_OnDiscoveryTimeout(object sender, EventArgs e) { Debug.Log(" ...DiscoveryTimeout, start server on local machine"); if (StatusText != null) { StatusText.text = "...Not found...Starting local server..."; } discovery.OnDiscoveryTimeout -= NetworkDiscovery_OnDiscoveryTimeout; discovery.OnServerDiscovered -= NetworkDiscovery_OnServerDiscovered; networkAddress = "localhost"; var network = StartHost(); if (network != null) { Debug.Log("Local server has started."); discovery.StartBroadcastServer(); } else { Debug.LogWarning("Not able to create the server, try to connect to localhost as client..."); StartClient(); } }