Пример #1
0
 // 这里必须要等待资源管理模块加载Lua AB包以后才能初始化
 public void onInit()
 {
     if (_luaEnv != null)
     {
         luaUpdater = gameObject.GetComponent <LuaUpdater>();
         if (luaUpdater == null)
         {
             luaUpdater = gameObject.AddComponent <LuaUpdater>();
         }
         luaUpdater.OnInit(_luaEnv);
     }
 }
Пример #2
0
 public override void Dispose()
 {
     if (_luaEnv != null)
     {
         try
         {
             if (luaUpdater != null)
             {
                 luaUpdater.Dispose();
                 Destroy(luaUpdater);
                 luaUpdater = null;
             }
             _luaEnv.Dispose();
             _luaEnv = null;
         }
         catch (System.Exception ex)
         {
             string msg = string.Format("LuaManager.Dispose Exception : {0}\n {1}", ex.Message, ex.StackTrace);
             Logger.LogError(msg, null);
         }
     }
 }