Last active
July 8, 2023 11:19
-
-
Save vbashiri/de62a8ce101cb8effed135e8fc60084f 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 BuildAssetBundles | |
{ | |
[MenuItem("Assets/Build AssetBundles")] | |
static void BuildAllAssetBundles() | |
{ | |
string assetBundleDirectory = "Assets/AssetBundles"; | |
if(!Directory.Exists(assetBundleDirectory)) | |
{ | |
Directory.CreateDirectory(assetBundleDirectory); | |
} | |
BuildPipeline.BuildAssetBundles(assetBundleDirectory, | |
BuildAssetBundleOptions.None, | |
BuildTarget.Android); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment