update runtime code

优化了文件路径合并的逻辑。
This commit is contained in:
hevinci
2023-06-09 18:25:43 +08:00
parent 895dde1cc8
commit 651b65d148
2 changed files with 29 additions and 21 deletions
@@ -75,12 +75,13 @@ namespace YooAsset
if (IsRawFile)
{
string cacheRoot = PersistentTools.GetCachedRawFileFolderPath(PackageName);
_cachedDataFilePath = $"{cacheRoot}/{folderName}/{CacheGUID}/{YooAssetSettings.CacheBundleDataFileName}{_fileExtension}";
_cachedDataFilePath = System.IO.Path.Combine(cacheRoot, folderName, CacheGUID, YooAssetSettings.CacheBundleDataFileName);
_cachedDataFilePath += _fileExtension;
}
else
{
string cacheRoot = PersistentTools.GetCachedBundleFileFolderPath(PackageName);
_cachedDataFilePath = $"{cacheRoot}/{folderName}/{CacheGUID}/{YooAssetSettings.CacheBundleDataFileName}";
_cachedDataFilePath = System.IO.Path.Combine(cacheRoot, folderName, CacheGUID, YooAssetSettings.CacheBundleDataFileName);
}
return _cachedDataFilePath;
}
@@ -101,12 +102,12 @@ namespace YooAsset
if (IsRawFile)
{
string cacheRoot = PersistentTools.GetCachedRawFileFolderPath(PackageName);
_cachedInfoFilePath = $"{cacheRoot}/{folderName}/{CacheGUID}/{YooAssetSettings.CacheBundleInfoFileName}";
_cachedInfoFilePath = System.IO.Path.Combine(cacheRoot, folderName, CacheGUID, YooAssetSettings.CacheBundleInfoFileName);
}
else
{
string cacheRoot = PersistentTools.GetCachedBundleFileFolderPath(PackageName);
_cachedInfoFilePath = $"{cacheRoot}/{folderName}/{CacheGUID}/{YooAssetSettings.CacheBundleInfoFileName}";
_cachedInfoFilePath = System.IO.Path.Combine(cacheRoot, folderName, CacheGUID, YooAssetSettings.CacheBundleInfoFileName);
}
return _cachedInfoFilePath;
}