Firstborn/Assets/Editor/CreateAssetBundles.cs

18 lines
469 B
C#
Raw Normal View History

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);
}
}