public virtual void Disconnect() { #if FN_WEBSERVER webserver.Stop(); #endif Networker.objectCreated -= CreatePendingObjects; if (Networker != null) { Networker.Disconnect(false); } if (sqpServer != null) { sqpServer.ShutDown(); } NetWorker.EndSession(); NetworkObject.ClearNetworkObjects(Networker); pendingObjects.Clear(); pendingNetworkObjects.Clear(); MasterServerNetworker = null; Networker = null; Instance = null; Destroy(gameObject); }
private void OnApplicationQuit() { if (Networker != null) { Networker.Disconnect(false); } NetWorker.EndSession(); }
protected virtual void OnApplicationQuit() { if (Networker != null) { Networker.Disconnect(false); } NetWorker.EndSession(); }
private void Disconnect() { if (networker != null) { networker.Disconnect(); } else { Debug.Log("Cannot find networker."); } }
void OnApplicationQuit() { Networker.Disconnect(); }