public static void RecordAssetDependency(string entryPath, List <string> bundlePathList) { string key = AssetPathHelper.EliminaterStartToken(entryPath); if (_dependentPhysicalPathListDict.ContainsKey(key) == false) { _dependentPhysicalPathListDict.Add(key, bundlePathList); _isRecordDirty = true; return; } List <string> existBundlePathList = _dependentPhysicalPathListDict[key]; if (existBundlePathList.Count != bundlePathList.Count) { _dependentPhysicalPathListDict[key] = bundlePathList; _isRecordDirty = true; return; } for (int i = 0; i < existBundlePathList.Count; i++) { if (existBundlePathList[i] != bundlePathList[i]) { _dependentPhysicalPathListDict[key] = bundlePathList; _isRecordDirty = true; return; } } }
public override HashSet <string> Process(string entryPath, GameObject go, StrategyNode node) { HashSet <string> result = new HashSet <string>(); Image image = go.GetComponent <Image>(); if (image != null) { string path = AssetDatabase.GetAssetPath(go); if (node.pattern.IsMatch(path)) { string folderPath = Path.GetDirectoryName(path); image.spriteKey = AssetPathHelper.ReplaceSlash(AssetPathHelper.EliminaterStartToken(folderPath)) + "${0}"; result.Add(path); } } return(result); }