/// <summary> /// 通过相对地址获取assetbundle的名字 /// </summary> /// <returns>The asset bundle name with path.</returns> /// <param name="path">相对地址.</param> static string getAssetBundleNameWithPath(string path) { string p = Path.GetDirectoryName(path) + "/" + Path.GetFileNameWithoutExtension(path); //判断是依赖资源还是固定资源 if (!isFixedBuildAsset(p)) { p = FilePathTools.replaceFirst(p, "Assets", "Dependencie"); //p = p.Replace ("Assets","Dependencie"); } else { p = FilePathTools.replaceFirst(p, FilePathTools.getRelativePath(buildRootPath) + "/", ""); //p = p.Replace (buildRoot + "/",""); } return(p); }