Пример #1
0
 public void RegisterSyncTemp(VFSBundle bundle)
 {
     mList_Sync_Temp.Add(bundle);
     if (mDict_Sync_Temp.ContainsKey(bundle.AssetBundleName))
     {
         mDict_Sync_Temp[bundle.AssetBundleName] = bundle;
     }
     else
     {
         mDict_Sync_Temp.Add(bundle.AssetBundleName, bundle);
     }
 }
Пример #2
0
 /// <summary>
 /// 加进来之前执行检查是否已存在,这里不检查!!!
 /// </summary>
 /// <param name="bundle"></param>
 public void Register(VFSBundle bundle)
 {
     mList_AssetBundles.Add(bundle);
     if (mDict_Bundles.ContainsKey(bundle.AssetBundleName))
     {
         mDict_Bundles[bundle.AssetBundleName] = bundle;
     }
     else
     {
         mDict_Bundles.Add(bundle.AssetBundleName, bundle);
     }
 }
Пример #3
0
 public bool TryGetBundleSync(string assetBundleName, out VFSBundle bundle)
 {
     lock (this)
     {
         if (mDict_Sync_Temp.TryGetValue(assetBundleName, out bundle))
         {
             if (bundle.LoadState == AssetLoadState.Unloaded)
             {
                 mList_Sync_Temp.Remove(bundle);
                 mDict_Sync_Temp.Remove(bundle.AssetBundleName);
                 bundle = null;
                 return(false);
             }
             else
             {
                 return(true);
             }
         }
         else
         {
             return(false);
         }
     }
 }