Exemplo n.º 1
0
        /// <summary> アセットバンドルをパッケージ化 </summary>
        public static void BuildPackage(string exportPath, AssetInfoManifest assetInfoManifest, string password)
        {
            var assetBundlePath = GetAssetBundleOutputPath();

            var assetbundlePackageBuilder = new BuildAssetbundlePackage();

            Action <int, int> reportProgress = (current, total) =>
            {
                var title = "Build AssetbundlePackage";
                var info  = string.Format("Build progress ({0}/{1})", current, total);

                EditorUtility.DisplayProgressBar(title, info, current / (float)total);
            };

            assetbundlePackageBuilder.Build(exportPath, assetBundlePath, assetInfoManifest, password, reportProgress);

            EditorUtility.ClearProgressBar();
        }
Exemplo n.º 2
0
        /// <summary> アセットバンドルをパッケージ化 </summary>
        public static void BuildPackage(string exportPath)
        {
            var outputPath = GetAssetBundleOutputPath(exportPath);

            var allFiles = Directory.GetFiles(outputPath, "*.*", SearchOption.AllDirectories);

            var assetbundlePackageBuilder = new BuildAssetbundlePackage();

            Action <int, int> reportProgress = (current, total) =>
            {
                var title = "Build AssetbundlePackage";
                var info  = string.Format("Build progress ({0}/{1})", current, total);

                EditorUtility.DisplayProgressBar(title, info, current / (float)total);
            };

            assetbundlePackageBuilder.Build(allFiles, reportProgress);

            EditorUtility.ClearProgressBar();
        }