rise-and-swine/Assets/Editor/CreateAssetBundles.cs
Chip 90e409459a WebGL Support :D
* Added WebGL support (obviously)
* Unpacked AssetBundles
* Added some info to README.md
2023-03-03 10:17:51 -05:00

14 lines
No EOL
514 B
C#

using UnityEditor;
using System.IO;
public class CreateAssetBundles
{
private static readonly string ASSET_BUNDLE_DIRECTORY = "Assets/StreamingAssets/AssetBundles";
[MenuItem("Assets/Build AssetBundles")]
static void BuildAllAssetBundles()
{
if (!Directory.Exists(ASSET_BUNDLE_DIRECTORY)) Directory.CreateDirectory(ASSET_BUNDLE_DIRECTORY);
BuildPipeline.BuildAssetBundles(ASSET_BUNDLE_DIRECTORY, BuildAssetBundleOptions.None, EditorUserBuildSettings.activeBuildTarget);
}
}