示例#1
0
 public void ReFreashValue()
 {
     abBulidWindow.ChoosedAsset = null;
     abBulidWindow.ChossedABB   = null;
     Info.ABBuiidInfo.ReadAssetbundleBuild(ABBuildCollect.Collect(ABTool.ManifestPath));
     UpdateInfo();
 }
        public override void Collect()
        {
            var files = ABBuildCollect.GetNonCollect(this);

            for (int i = 0; i < files.Count; i++)
            {
                var item = files[i];
                AssetBundleBuild build = new AssetBundleBuild();
                build.assetBundleName = ABBuildCollect.GetAbsPathWithoutExtension(item);
                build.assetNames      = new string[] { item };
                ABBuildCollect.collectedAssets.AddRange(build.assetNames);
                ABBuildCollect.Builds.Add(build);
            }
        }
        public override void Collect()
        {
            var           files = ABBuildCollect.GetNonCollect(this);
            List <string> list  = new List <string>();

            foreach (var item in files)
            {
                list.AddRange(ABBuildCollect.GetDependenciesWithoutShared(item));
            }
            files.AddRange(list);
            AssetBundleBuild build = new AssetBundleBuild();

            build.assetBundleName = bundleName;
            build.assetNames      = files.ToArray();
            ABBuildCollect.Builds.Add(build);
            ABBuildCollect.collectedAssets.AddRange(files);
        }
        public override void Collect()
        {
            var files = ABBuildCollect.GetNonCollect(this);

            for (int i = 0; i < files.Count; i++)
            {
                string filePath = files[i];
                if (EditorUtility.DisplayCancelableProgressBar(string.Format("Packing... [{0}/{1}]", i, files.Count), filePath, i * 1f / files.Count))
                {
                    break;
                }
                AssetBundleBuild build = new AssetBundleBuild();
                build.assetBundleName = ABBuildCollect.GetAbsPathWithoutExtension(filePath);
                List <string> assetNames = ABBuildCollect.GetDependenciesWithoutShared(filePath);
                assetNames.Add(filePath);
                build.assetNames = assetNames.ToArray();
                ABBuildCollect.collectedAssets.AddRange(assetNames);
                ABBuildCollect.Builds.Add(build);
            }
        }
        public override void Collect()
        {
            List <string> files = ABBuildCollect.GetNonCollect(this);
            Dictionary <string, List <string> > bundles = new Dictionary <string, List <string> >();

            for (int i = 0; i < files.Count; i++)
            {
                var filePath = files[i];
                if (EditorUtility.DisplayCancelableProgressBar(string.Format("Collecting... [{0}/{1}]", i, files.Count), filePath, i * 1f / files.Count))
                {
                    break;
                }
                var path = Path.GetDirectoryName(filePath);
                if (!bundles.ContainsKey(path))
                {
                    bundles[path] = new List <string>();
                }
                bundles[path].Add(filePath);
                bundles[path].AddRange(ABBuildCollect.GetDependenciesWithoutShared(filePath));
            }

            int count = 0;

            foreach (var item in bundles)
            {
                AssetBundleBuild build = new AssetBundleBuild();
                build.assetBundleName = ABBuildCollect.GetAbsPathWithoutExtension(item.Key) + "_" + item.Value.Count;
                build.assetNames      = item.Value.ToArray();
                ABBuildCollect.collectedAssets.AddRange(build.assetNames);
                ABBuildCollect.Builds.Add(build);
                if (EditorUtility.DisplayCancelableProgressBar(string.Format("Packing... [{0}/{1}]", count, bundles.Count), build.assetBundleName, count * 1f / bundles.Count))
                {
                    break;
                }
                count++;
            }
        }
 public override string GetAssetBundleName(string assetPath)
 {
     return(ABBuildCollect.GetAbsPathWithoutExtension(assetPath));
 }