bool Used(string fullName, HashSet <string> packagePaths) { Package.Asset asset = CustomDeserializer.FindAsset(fullName); string path = asset?.package.packagePath; return(path != null && packagePaths.Contains(path)); }
HashSet <string> GetPackagePaths(params List <string>[] names) { HashSet <string> paths = new HashSet <string>(); for (int i = 0; i < names.Length; i++) { for (int j = 0; j < names[i].Count; j++) { Package.Asset asset = CustomDeserializer.FindAsset(names[i][j]); string path = asset?.package.packagePath; if (path != null) { paths.Add(path); } } } return(paths); }