Esempio n. 1
0
    public static void LoadManifest(string sceneAbName, string scenename)
    {
        sceneAssetBundleName = sceneAbName;
        sceneName            = scenename;


                #if UNITY_EDITOR
        Debug.LogFormat("<color=green>SimulateAssetBundleInEditor {0} mode </color> <color=#8cacbc> change( menu AssetBundles/Simulation Mode)</color>", CResLoader.SimulateAssetBundleInEditor ? "simulate" : "assetbundle");
        if (CResLoader.SimulateAssetBundleInEditor)
        {
            BeginLoadScene();
            return;
        }
                #endif
        var url = CUtils.GetPlatformFolderForAssetBundles();
        var req = LRequest.Get();
        req.relativeUrl = CUtils.GetRightFileName(url);
        req.assetType   = typeof(AssetBundleManifest);
        req.assetName   = "assetbundlemanifest";
        req.OnComplete  = (CRequest req1) =>
        {
            LResLoader.assetBundleManifest = req1.data as AssetBundleManifest;
                        #if HUGULA_LOADER_DEBUG
            Debug.LogFormat("assetbundlemanifest {0} is done !", req1.url);
                        #endif
            BeginLoadScene();
        };
        req.OnEnd         = (CRequest req1) => { BeginLoadScene(); };
        req.async         = true;
        req.isAssetBundle = true;
        LResLoader.instance.OnSharedComplete += OnSharedComplete;
        LResLoader.instance.LoadReq(req);
    }
Esempio n. 2
0
    public static void BeginLoadScene()
    {
        CUtils.DebugCastTime("LoadingFirst");
        var req = LRequest.Get();

        req.relativeUrl = CUtils.GetRightFileName(sceneAssetBundleName);
        req.assetName   = sceneName;
        req.OnComplete  = OnSceneAbLoaded;
        req.OnEnd       = OnSceneAbError;
        req.assetType   = CacheManager.Typeof_ABScene;
        req.async       = true;
        LResLoader.instance.LoadReq(req);
    }
Esempio n. 3
0
    public static void LoadManifest(string sceneAbName, string scenename)
    {
        sceneAssetBundleName = sceneAbName;
        sceneName            = scenename;
        var url = CUtils.GetPlatformFolderForAssetBundles();
        var req = LRequest.Get();

        req.relativeUrl = CUtils.GetRightFileName(url);
        req.assetType   = typeof(AssetBundleManifest);
        req.assetName   = "assetbundlemanifest";
        req.OnComplete  = (CRequest req1) =>
        {
            LResLoader.assetBundleManifest = req1.data as AssetBundleManifest;
            BeginLoadScene();
        };
        req.OnEnd         = (CRequest req1) => { BeginLoadScene(); };
        req.async         = true;
        req.isAssetBundle = true;
        LResLoader.instance.OnSharedComplete += OnSharedComplete;
        LResLoader.instance.LoadReq(req);
    }