static int _m_asyncLoadLocalBundle(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                AsyncAssetLoadGroup gen_to_be_invoked = (AsyncAssetLoadGroup)translator.FastGetCSObj(L, 1);



                {
                    System.Collections.Generic.List <string> _list_bundle_path = (System.Collections.Generic.List <string>)translator.GetObject(L, 2, typeof(System.Collections.Generic.List <string>));
                    _eAsyncAssetLoadType _loader_type; translator.Get(L, 3, out _loader_type);
                    System.Action <System.Collections.Generic.List <UnityEngine.AssetBundle> > _loaded_action = translator.GetDelegate <System.Action <System.Collections.Generic.List <UnityEngine.AssetBundle> > >(L, 4);

                    LoaderTicket gen_ret = gen_to_be_invoked.asyncLoadLocalBundle(_list_bundle_path, _loader_type, _loaded_action);
                    translator.Push(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
예제 #2
0
        //---------------------------------------------------------------------
        // 需要调整为可并发调用的接口
        public void LuaAsyncLoadLocalUiBundle(Action loaddone_callback, params string[] need_load_ab_path)
        {
            List <string> list_ab = new List <string>();

            foreach (var i in need_load_ab_path)
            {
                list_ab.Add(i);
            }

            AsyncAssetLoadGroup.asyncLoadLocalBundle(
                list_ab, _eAsyncAssetLoadType.LocalBundle, (List <AssetBundle> list_abex) =>
            {
                foreach (var i in list_abex)
                {
                    UIPackage.AddPackage(i);
                }

                loaddone_callback();
            });
        }