예제 #1
0
        public void UnloadBundle(string assetBundleName)
        {
            assetBundleName = assetBundleName.BundleNameToLower();

            string[] dependencies = AssetBundleHelper.GetSortedDependencies(assetBundleName);

            //Log.Debug($"-----------dep unload {assetBundleName} dep: {dependencies.ToList().ListToString()}");
            foreach (string dependency in dependencies)
            {
                this.UnloadOneBundle(dependency);
            }
        }
예제 #2
0
 /// <summary>
 /// 异步加载assetbundle
 /// </summary>
 /// <param name="assetBundleName"></param>
 /// <returns></returns>
 public async ETTask LoadBundleAsync(string assetBundleName)
 {
     assetBundleName = assetBundleName.ToLower();
     string[] dependencies = AssetBundleHelper.GetSortedDependencies(assetBundleName);
     // Log.Debug($"-----------dep load {assetBundleName} dep: {dependencies.ToList().ListToString()}");
     foreach (string dependency in dependencies)
     {
         if (string.IsNullOrEmpty(dependency))
         {
             continue;
         }
         await this.LoadOneBundleAsync(dependency);
     }
 }