mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-14 05:35:08 +00:00
17 lines
507 B
C#
17 lines
507 B
C#
|
using UnityEditor;
|
||
|
using UnityEngine;
|
||
|
using System.IO;
|
||
|
|
||
|
public class CreateAssetBundles
|
||
|
{
|
||
|
[MenuItem("Assets/Build AssetBundles")]
|
||
|
static void BuildAllAssetBundles()
|
||
|
{
|
||
|
string assetBundleDirectory = "Assets/StreamingAssets";
|
||
|
if (!Directory.Exists(Application.streamingAssetsPath))
|
||
|
{
|
||
|
Directory.CreateDirectory(assetBundleDirectory);
|
||
|
}
|
||
|
BuildPipeline.BuildAssetBundles(assetBundleDirectory, BuildAssetBundleOptions.None, EditorUserBuildSettings.activeBuildTarget);
|
||
|
}
|
||
|
}
|