// Use this for initialization void Awake() { loader = new GameLuaLoader(); lua = new LuaState(); this.OpenLibs(); lua.LuaSetTop(0); LuaBinder.Bind(lua); DelegateFactory.Init(); LuaCoroutine.Register(lua, this); }
public void Close() { if (loop != null) { loop.Destroy(); loop = null; } if (lua != null) { lua.Dispose(); lua = null; } loader = null; }