
using UnityEngine;
using UnityEditor;
using System.IO;

public class ExportAssetBundle {

	[MenuItem("Tools/Export AssetBundle")]
	static void Export(){
        Build("/iOS/", BuildTarget.iOS);
//        Build("/Android/", BuildTarget.Android);
	}
    
    private static void Build(string path, BuildTarget targetPlatform){
		Directory.CreateDirectory(Application.streamingAssetsPath + path);
		BuildPipeline.BuildAssetBundles(Application.streamingAssetsPath + path, BuildAssetBundleOptions.ChunkBasedCompression, targetPlatform);
    }
}
