using System;
using System.Linq;
namespace YooAsset
{
[Serializable]
internal class PackageAsset
{
///
/// 可寻址地址
///
public string Address;
///
/// 资源路径
///
public string AssetPath;
///
/// 资源GUID
///
public string AssetGUID;
///
/// 资源的分类标签
///
public string[] AssetTags;
///
/// 所属资源包ID
///
public int BundleID;
///
/// 是否包含Tag
///
public bool HasTag(string[] tags)
{
if (tags == null || tags.Length == 0)
return false;
if (AssetTags == null || AssetTags.Length == 0)
return false;
foreach (var tag in tags)
{
if (AssetTags.Contains(tag))
return true;
}
return false;
}
}
}