示例#1
0
        public void UnloadBundle(string assetBundleName)
        {
            assetBundleName = AssetBundleHelper.BundleNameToLower(assetBundleName);

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

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