// самый ГЛОБАЛЬНЫЙ выход, из всей юнити. Вызывается из сцен. public static void OnDispose() { if (!isStarted) { return; } isGameOver = false; if (CurrentWorld != null) { CurrentWorld.OnExit(); CurrentWorld = null; } if (switchingScenes) { switchingScenes = false; return; } Debugger.Log("GLOBAL EXIT"); GameManager.Dispose(); if (serviceServer != null) { serviceServer.Dispose(); } }
public void Stop() { try { LogOut(); } catch { } if (serviceServer != null) { serviceServer.Stop(); serviceServer.Dispose(); serviceServer = null; } if (textServer != null) { textServer.Stop(); textServer.Dispose(); textServer = null; } if (fileServer != null) { fileServer.Stop(); fileServer.Dispose(); fileServer = null; } }