dv_CR-style_smoke_deflectors/BundleBuilder/Assets/DontBuildThis/Scripts/BundleChecker.cs

35 lines
856 B
C#
Raw Permalink Normal View History

2023-12-09 15:33:48 +00:00
using System.IO;
using UnityEditor;
using UnityEngine;
#if UNITY_EDITOR
public class BundleChecker : MonoBehaviour
{
public string BundleFolder;
public void CheckEm()
{
// var bundlePaths = Directory.GetFiles(Application.dataPath + "/ToCheck");
var bundlePaths = Directory.GetFiles(BundleFolder);
foreach (var bp in bundlePaths)
{
var extension = Path.GetExtension(bp);
if (extension == ".meta" || extension == ".manifest")
{
continue;
}
var assBun = AssetBundle.LoadFromFile(bp);
Debug.Log(assBun.name);
foreach (var assName in assBun.GetAllAssetNames())
{
Debug.Log(assName);
}
}
}
}
#endif