public AssetTarget(Object o, FileInfo file, string assetPath) { this.asset = o; this.file = file; this.assetPath = assetPath; this.bundleShortName = file.Name.ToLower(); this.bundleName = HashUtil.Get(AssetBundleUtils.ConvertToABName(assetPath)) + ".ab"; this.bundleSavePath = Path.Combine(AssetBundleUtils.pathResolver.BundleSavePath, bundleName); _isFileChanged = true; _metaHash = "0"; }
public AssetTarget(Object o, FileInfo file, string assetPath) { string abName = AssetBundleUtils.ConvertToABName(assetPath); string dirName = file.Directory.Name; if (dirName.StartsWith("&")) { int index = file.DirectoryName.IndexOf("Assets"); if (index != -1) { dirName = file.DirectoryName.Substring(index); abName = AssetBundleUtils.ConvertToABName(dirName); } } this.asset = o; this.file = file; this.assetPath = assetPath; this.bundleShortName = file.Name.ToLower(); this.bundleName = HashUtil.Get(abName) + ".ab"; this.bundleSavePath = Path.Combine(AssetBundleUtils.pathResolver.BundleSavePath, bundleName); _isFileChanged = true; _metaHash = "0"; }