mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2024-12-29 18:55:06 +08:00
test: add test for runtime build (#452)
This commit is contained in:
parent
11b10a82d5
commit
fc1abcfede
28
Assets/_ModularAvatar/EditModeTests/BuildAssetBundle.cs
Normal file
28
Assets/_ModularAvatar/EditModeTests/BuildAssetBundle.cs
Normal file
@ -0,0 +1,28 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 40abbf0448b14fdba4be41e41899accb
|
||||
timeCreated: 1695686965
|
Loading…
Reference in New Issue
Block a user