diff --git a/Assets/YooAsset/Samples~/Extension Sample/Runtime/ExtensionFileSystem/WechatFileSystem/Operation/WXFSClearUnusedBundleFilesAsync.cs b/Assets/YooAsset/Samples~/Extension Sample/Runtime/ExtensionFileSystem/WechatFileSystem/Operation/WXFSClearUnusedBundleFilesAsync.cs index 87b40f3a..0109a255 100644 --- a/Assets/YooAsset/Samples~/Extension Sample/Runtime/ExtensionFileSystem/WechatFileSystem/Operation/WXFSClearUnusedBundleFilesAsync.cs +++ b/Assets/YooAsset/Samples~/Extension Sample/Runtime/ExtensionFileSystem/WechatFileSystem/Operation/WXFSClearUnusedBundleFilesAsync.cs @@ -53,7 +53,8 @@ internal class WXFSClearUnusedBundleFilesAsync : FSClearCacheFilesOperation string bundleGUID = Path.GetFileNameWithoutExtension(fileStat.path); if (_manifest.TryGetPackageBundleByBundleGUID(bundleGUID, out PackageBundle value) == false) { - _unusedCacheFiles.Add(fileStat.path); + string fullPath = WX.GetCachePath(fileStat.path); + if (!_unusedCacheFiles.Contains(fullPath)) _unusedCacheFiles.Add(fullPath); } } diff --git a/Assets/YooAsset/Samples~/Extension Sample/Runtime/ExtensionFileSystem/WechatFileSystem/WechatFileSystem.cs b/Assets/YooAsset/Samples~/Extension Sample/Runtime/ExtensionFileSystem/WechatFileSystem/WechatFileSystem.cs index 1220a8f8..ab3cbe59 100644 --- a/Assets/YooAsset/Samples~/Extension Sample/Runtime/ExtensionFileSystem/WechatFileSystem/WechatFileSystem.cs +++ b/Assets/YooAsset/Samples~/Extension Sample/Runtime/ExtensionFileSystem/WechatFileSystem/WechatFileSystem.cs @@ -183,6 +183,11 @@ internal class WechatFileSystem : IFileSystem throw new System.Exception("请配置微信小游戏缓存根目录!"); } + if (!_wxCacheRoot.StartsWith(WX.PluginCachePath)) + { + _wxCacheRoot = PathUtility.Combine(WX.PluginCachePath, _wxCacheRoot); + } + // 注意:CDN服务未启用的情况下,使用微信WEB服务器 if (RemoteServices == null) {