using System.Collections.Generic; using System.IO; using UnityEngine; using System.Linq; namespace MetaCity.BundleKit.Editor { public static class AvatarBundleExporter { public static List LoadLastAvatarBuiltCatalog() { var catalogReader = new StreamReader(Constants.AvatarBundleLocalCatalogPath); try { var catalogCollection = JsonUtility.FromJson(catalogReader.ReadToEnd()); catalogReader.Close(); return catalogCollection.catalogs.ToList(); } catch (System.Exception) { Debug.Log($"Cannot load last build catalog from {Constants.BundleLocalCatalogPath}!"); catalogReader.Close(); } return new List(); } } }