概要
using System.IO; using UnityEditor; using UnityEngine; public static class Example { [MenuItem( "Tools/Build Asset Bundles" )] private static void BuildAssetBundles() { var outputPath = "AssetBundles"; Directory.CreateDirectory( outputPath ); var manifest = BuildPipeline.BuildAssetBundles ( outputPath: outputPath, assetBundleOptions: BuildAssetBundleOptions.DryRunBuild, targetPlatform: BuildTarget.StandaloneWindows ); foreach ( var x in manifest.GetAllAssetBundles() ) { Debug.Log( x ); } } }
assetBundleOptions に BuildAssetBundleOptions.DryRunBuild を指定すると
実際にはアセットバンドルをビルドせず、manifest のみを作成できるようになります