Esempio n. 1
0
 protected IEnumerator HangUpForWaitLoadingBundle(BundleData bundle)
 {
     while (!bundle.IsBundleLoaded)
     {
         yield return(null);
     }
 }
Esempio n. 2
0
 private void AddToBundleDic(string bundleName, BundleData bundleData)
 {
     lock (_syncBundleDic)
     {
         bundleDic.Add(bundleName, bundleData);
     }
 }
Esempio n. 3
0
 protected bool FindBundle(string bundleName, out BundleData bundle)
 {
     lock (_syncBundleDic)
     {
         var msg = string.Format("===>Find bundle from bundleDic");
         Debug.Log(msg);
         if (bundleDic.TryGetValue(bundleName, out bundle))
         {
             return(true);
         }
         this.AddToBundleDic(bundleName, this);
         return(false);
     }
 }
Esempio n. 4
0
        private void GetDependencies()
        {
            string[] dependencies = MainManifest.GetAllDependencies(this.bundleName);
            foreach (var d in dependencies)
            {
                Debug.Log("Dependencies: " + d);
                var bundleData = new BundleData();
                var bundle     = AssetBundle.LoadFromFile(System.IO.Path.Combine(URL.ASSETBUNDLE_LOCAL_URL, d));
                bundleData.bundleName     = d;
                bundleData.bundle         = bundle;
                bundleData.IsBundleLoaded = true;

                this.AddToBundleDic(d, bundleData);
            }
        }