// make sure lua state finalize at last // make sure LuaSvrGameObject excute order is max(9999) void OnDestroy() { if (state != null) { state.Close(); state = null; } }
public void uninit() { SimpleLogger.DEBUG("LuaSvr", "uninit start"); luaState.Close(); SimpleLogger.DEBUG("LuaSvr", "uninit end"); }
public void Close() { if (!inited) { return; } inited = false; main = null; luaState.Close(); luaState = null; }
// make sure lua state finalize at last // make sure LuaSvrGameObject excute order is max(9999) void OnDestroy() { if (state != null) { if (di != null) { di.close(); di = null; } state.Close(); state = null; } }