public void StopHosting() { if (isServer) { StopHost(); NetworkServer.ClearLocalObjects(); NetworkServer.ClearSpawners(); } if (isClient) { StopHost(); StopClient(); } if (MyNetDiscovery.running) { MyNetDiscovery.StopBroadcast(); } StopAllCoroutines(); NetworkServer.Reset(); NetworkTransport.Init(); NetworkTransport.Shutdown(); isServer = false; isClient = false; TimeManager.Instance.gameObject.SetActive(false); UIManager.Instance.Connection(); }
void CleanUp() { StopHost(); StopClient(); NetworkServer.ClearLocalObjects(); NetworkServer.ClearSpawners(); NetworkServer.Reset(); }
private static void CleanUpHost() { return; NetworkServer.ClearHandlers(); NetworkServer.ClearLocalObjects(); NetworkServer.DisconnectAll(); }
public void StopHosting() { if (isServer) { StopHost(); NetworkServer.ClearLocalObjects(); NetworkServer.ClearSpawners(); } if (isClient) { StopHost(); StopClient(); } StopAllCoroutines(); NetworkServer.Reset(); AutoConnectButton.GetComponentInChildren <Text>().text = TextManager.Instance.Search; EnableButtons(); UIManager.Instance.ResetMenus(); }
public void ResetServer() { NetworkServer.ClearLocalObjects(); NetworkServer.Reset(); NetworkServer.Shutdown(); }
public override void OnEnter() { base.OnEnter(); NetworkServer.ClearLocalObjects(); Finish(); }
// Use this for initialization void Start() { NetworkServer.ClearLocalObjects(); }