概要
using NUnit.Framework;
using System.Linq;
using System.Text;
using UnityEditor;
public static class Example
{
[Test]
public static void CheckAssetBundleNamedAssets()
{
var list = AssetDatabase.GetAllAssetPaths()
.Select( c => new { assetPath = c, assetBundleName = AssetDatabase.GetImplicitAssetBundleName( c ) } )
.Where( c => !string.IsNullOrWhiteSpace( c.assetBundleName ) )
.ToArray()
;
var isExist = list.Any();
if ( !isExist ) return;
var builder = new StringBuilder();
foreach ( var n in list )
{
builder.AppendLine( $"{n.assetPath}" );
}
Assert.Fail( builder.ToString() );
}
}
関連記事