18 lines
469 B
C#
18 lines
469 B
C#
|
using UnityEditor;
|
||
|
using UnityEngine;
|
||
|
using System.IO;
|
||
|
|
||
|
public class CreateAssetBundles {
|
||
|
|
||
|
[MenuItem("Assets/Build AssetBundles")]
|
||
|
static void BuildAllAssetBundles() {
|
||
|
string assetBundleDirectory = "Assets/AssetBundles";
|
||
|
if(!Directory.Exists(assetBundleDirectory))
|
||
|
Directory.CreateDirectory(assetBundleDirectory);
|
||
|
|
||
|
BuildPipeline.BuildAssetBundles(assetBundleDirectory,
|
||
|
BuildAssetBundleOptions.None,
|
||
|
BuildTarget.StandaloneWindows);
|
||
|
}
|
||
|
}
|