UP-Viagg-io/Viagg-io/Assets/Packages/Asset Usage Finder/Editor/Data/AssetDependencies.cs

25 lines
695 B
C#

using System;
using System.Linq;
using UnityEngine;
namespace AssetUsageFinder {
[Serializable]
public class AssetDependencies {
public string[] DependencyGuids;
public string HashString;
[NonSerialized] Hash128 _hashCache;
public Hash128 DependencyHash {
get { return _hashCache.Equals(default(Hash128)) ? Hash128.Parse(HashString) : _hashCache; }
set {
_hashCache = value;
HashString = value.ToString();
}
}
public bool Contains(string guid) {
return DependencyGuids.Any(d => StringComparer.InvariantCultureIgnoreCase.Equals(guid, d));
}
}
}