コード例 #1
0
    IEnumerator LoadAssetBundleManifest()
    {
        string path = BoyApp.GetAssetBundlePath("AssetBundle");
        int    ver  = BoyApp.GetAssetBundleVer("AssetBundle");

        UnityWebRequest req = UnityWebRequest.GetAssetBundle(path, (uint)ver, 0);

        yield return(req.SendWebRequest());

        AssetBundle asset = DownloadHandlerAssetBundle.GetContent(req);

        BoyApp.manifestAssetBundle = asset;
        BoyApp.manifest            = asset.LoadAsset <AssetBundleManifest>("AssetBundleManifest");

        BoyApp.LoadAssetBundleAndAllDependencies("prefabs/loadingui", (System.Object loading) => {
            Instantiate(((AssetBundle)loading).LoadAsset("LoadingUI"));
        });
    }
コード例 #2
0
        static int _m_LoadAssetBundleAndAllDependencies_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                {
                    string          name     = LuaAPI.lua_tostring(L, 1);
                    LoadingCallback callback = translator.GetDelegate <LoadingCallback>(L, 2);

                    BoyApp.LoadAssetBundleAndAllDependencies(name, callback);



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