static bool Quit() { NetworkServer.Close(); #if UPR_LUA_PROFILER NetWorkClient.Close(); #endif return(true); }
private void OnApplicationQuit() { #if UNITY_EDITOR desotryCount = 0; Destroy(gameObject); UnityEditor.EditorApplication.update += WaitDestory; #else NetWorkClient.Close(); #endif }
private void WaitDestory() { desotryCount++; if (desotryCount > 10) { UnityEditor.EditorApplication.update -= WaitDestory; if (LuaProfiler.mainL != IntPtr.Zero) { LuaDLL.lua_close(LuaProfiler.mainL); } LuaProfiler.mainL = IntPtr.Zero; NetWorkClient.Close(); desotryCount = 0; } }
public static int Close(IntPtr l) { int result; try { NetWorkClient netWorkClient = (NetWorkClient)LuaObject.checkSelf(l); netWorkClient.Close(); LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
internal void Close() { _client?.Close(); _client = null; }