Ricardo Lopes 26f8c23c68
Unity Helper Project (#13)
* Add Unity project

* Generate asset bundles in project root

* Rename Assets directory to Assetbundles

* Add Unity project readme

* Ignore this one extra assetbundle file that Unity generates
2020-02-16 00:12:40 +01:00

15 lines
554 B
C#

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