void StartLooper() { loop = gameObject.AddComponent <LuaLooper>(); loop.luaState = lua; myLoop = gameObject.AddComponent <MyLuaLooper>(); myLoop.luaState = lua; }
public void Close() { loop.Destroy(); loop = null; myLoop.Destroy(); myLoop = null; lua.Dispose(); lua = null; loader = null; }