diff --git a/Assets/_ModularAvatar/EditModeTests/BuildAssetBundle.cs b/Assets/_ModularAvatar/EditModeTests/BuildAssetBundle.cs new file mode 100644 index 00000000..68a3b0ce --- /dev/null +++ b/Assets/_ModularAvatar/EditModeTests/BuildAssetBundle.cs @@ -0,0 +1,28 @@ +using NUnit.Framework; +using UnityEditor; + +namespace _ModularAvatar.EditModeTests +{ + /// + /// This tests compilation error in runtime build with building asset bundle. + /// + 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); + } + } +} \ No newline at end of file diff --git a/Assets/_ModularAvatar/EditModeTests/BuildAssetBundle.cs.meta b/Assets/_ModularAvatar/EditModeTests/BuildAssetBundle.cs.meta new file mode 100644 index 00000000..597f1170 --- /dev/null +++ b/Assets/_ModularAvatar/EditModeTests/BuildAssetBundle.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 40abbf0448b14fdba4be41e41899accb +timeCreated: 1695686965 \ No newline at end of file