Created
October 29, 2019 08:35
-
-
Save ssabii/cc9905efc4de0bf2760482e9c01ba82f to your computer and use it in GitHub Desktop.
This file contains 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
using UnityEditor; | |
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); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment