Last active
August 13, 2018 01:56
-
-
Save neogeek/a23c7b2e6adf045a610c8ea9c9141a67 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if UNITY_EDITOR | |
using System.IO; | |
using UnityEditor; | |
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, EditorUserBuildSettings.activeBuildTarget); | |
} | |
} | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment