mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-12-04 23:37:27 +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);
|
||
|
}
|
||
|
}
|