// 例如:AssetBundlerServer/FenBao/Win/version_1/package0_i public static string GetFenBaoPath(ABPathInfo pathInfo) { string assetPath = AssetsCommon.GetAssetPath(); string assetFolderName = PathConstant.FolderName.FEN_BAO; string osFolderName = AssetsCommon.GetPlatformFolderName(pathInfo.OsType); string versionFolderName = PathConstant.FolderName.GetFenBaoVersion(pathInfo.Version); if (osFolderName == string.Empty) { Debug.LogError("平台文件夹名称获取错误:" + pathInfo.OsType); return(string.Empty); } List <string> paths = new List <string>() { PathConstant.SERVER_FOLDER_NAME, assetFolderName, osFolderName, versionFolderName }; string path = AssetsCommon.BuildPath(assetPath, paths); if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } return(path); }
public static string GetABCacheURL(ePlatformType osType) { string assetFolderName = PathConstant.FolderName.AB_CACHE; string osFolderName = AssetsCommon.GetPlatformFolderName(osType); List <string> paths = new List <string>() { assetFolderName, osFolderName }; return(AssetsCommon.BuildPath(URL, paths)); }
public static string GetVersionListURL(ePlatformType osType) { string assetFolderName = PathConstant.FolderName.FILE_MANIFEST; string osFolderName = AssetsCommon.GetPlatformFolderName(osType); List <string> paths = new List <string>() { assetFolderName, osFolderName }; string url = AssetsCommon.BuildPath(URL, paths); return(AssetsCommon.BuildFileName(url, PathConstant.FileName.VERSION_LIST)); }
public static string GetFenBaoURL(ABPathInfo pathInfo) { string assetFolderName = PathConstant.FolderName.FEN_BAO; string osFolderName = AssetsCommon.GetPlatformFolderName(pathInfo.OsType); string versionFolderName = PathConstant.FolderName.GetFenBaoVersion(pathInfo.Version); List <string> paths = new List <string>() { assetFolderName, osFolderName, versionFolderName }; return(AssetsCommon.BuildPath(URL, paths)); }
public static string GetFileManifestURL(ABPathInfo pathInfo) { string assetFolderName = PathConstant.FolderName.FILE_MANIFEST; string osFolderName = AssetsCommon.GetPlatformFolderName(pathInfo.OsType); string versionFolderName = PathConstant.FolderName.GetVersion(pathInfo.Version); List <string> paths = new List <string>() { assetFolderName, osFolderName, versionFolderName }; return(AssetsCommon.BuildPath(URL, paths)); }
public static string Get() { string dataPath = Application.streamingAssetsPath; string osFolderName = AssetsCommon.GetPlatformFolderName(UnpackCommon.GetOsType()); List <string> folders = new List <string>() { osFolderName }; string path = AssetsCommon.BuildPath(dataPath, folders); if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } return(path); }
public static string GetABFile(string assetName) { ePlatformType osType = UnpackCommon.GetOsType(); string dataPath = Application.streamingAssetsPath; string osFolderName = AssetsCommon.GetPlatformFolderName(osType); List <string> folders = new List <string>() { osFolderName }; string path = AssetsCommon.BuildPath(dataPath, folders); if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } return(AssetsCommon.BuildFileName(path, assetName)); }
public static string GetVersionListPath(ePlatformType osType) { string assetPath = AssetsCommon.GetAssetPath(); string assetFolderName = PathConstant.FolderName.FILE_MANIFEST; string osFolderName = AssetsCommon.GetPlatformFolderName(osType); List <string> paths = new List <string>() { PathConstant.SERVER_FOLDER_NAME, assetFolderName, osFolderName }; string path = AssetsCommon.BuildPath(assetPath, paths); if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } return(path); }