mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2024-12-29 02:35:06 +08:00
28 lines
795 B
C#
28 lines
795 B
C#
|
using NUnit.Framework;
|
||
|
using UnityEditor;
|
||
|
|
||
|
namespace _ModularAvatar.EditModeTests
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// This tests compilation error in runtime build with building asset bundle.
|
||
|
/// </summary>
|
||
|
public class BuildAssetBundle
|
||
|
{
|
||
|
[Test]
|
||
|
public void Build()
|
||
|
{
|
||
|
var path = "Packages/nadena.dev.modular-avatar/Assets/FixedPrefab.prefab";
|
||
|
|
||
|
var assetBundleBuild = new AssetBundleBuild()
|
||
|
{
|
||
|
assetNames = new string[]{ path },
|
||
|
assetBundleName = "asset.unity3d"
|
||
|
};
|
||
|
|
||
|
BuildPipeline.BuildAssetBundles("Assets/",
|
||
|
new [] {assetBundleBuild},
|
||
|
BuildAssetBundleOptions.None,
|
||
|
EditorUserBuildSettings.activeBuildTarget);
|
||
|
}
|
||
|
}
|
||
|
}
|