using System; using System.Collections.Generic; using System.Linq; namespace NBC.Asset.Editor { [Serializable] public class BuildBundle { public string Name; public string Hash; public int Size; public List Assets = new List(); public string[] Dependencies; /// /// 资源包标签 /// public string Tags; public void AddAsset(ICollection assets) { foreach (var asset in assets) { AddAsset(asset); } } public void AddAsset(BuildAsset asset) { asset.Bundle = Name; Assets.Add(asset); } public string[] GetAssetNames() { HashSet assetNames = new HashSet(); foreach (var asset in Assets) { assetNames.Add(asset.Path); } return assetNames.ToArray(); } } }