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


                AssetBundles.AssetBundleManager gen_to_be_invoked = (AssetBundles.AssetBundleManager)translator.FastGetCSObj(L, 1);



                {
                    string      _assetPath = LuaAPI.lua_tostring(L, 2);
                    System.Type _assetType = (System.Type)translator.GetObject(L, 3, typeof(System.Type));

                    var gen_ret = gen_to_be_invoked.LoadAssetAsync(_assetPath, _assetType);
                    translator.Push(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
示例#2
0
        static int _m_LoadAssetAsync(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                AssetBundles.AssetBundleManager gen_to_be_invoked = (AssetBundles.AssetBundleManager)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 4 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <System.Type>(L, 3) && translator.Assignable <System.Action <UnityEngine.Object> >(L, 4))
                {
                    string      _assetPath = LuaAPI.lua_tostring(L, 2);
                    System.Type _assetType = (System.Type)translator.GetObject(L, 3, typeof(System.Type));
                    System.Action <UnityEngine.Object> _callBack = translator.GetDelegate <System.Action <UnityEngine.Object> >(L, 4);

                    AssetBundles.BaseAssetAsyncLoader gen_ret = gen_to_be_invoked.LoadAssetAsync(_assetPath, _assetType, _callBack);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 3 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <System.Type>(L, 3))
                {
                    string      _assetPath = LuaAPI.lua_tostring(L, 2);
                    System.Type _assetType = (System.Type)translator.GetObject(L, 3, typeof(System.Type));

                    AssetBundles.BaseAssetAsyncLoader gen_ret = gen_to_be_invoked.LoadAssetAsync(_assetPath, _assetType);
                    translator.Push(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to AssetBundles.AssetBundleManager.LoadAssetAsync!"));
        }