refactor: remove WebGame platform cache query APIs

移除 WebGame 平台缓存查询接口
This commit is contained in:
何冠峰
2026-05-21 14:34:07 +08:00
parent 2f8355c3f4
commit 99b975554a
6 changed files with 1 additions and 80 deletions

View File

@@ -28,17 +28,5 @@ internal class AlipayPlatform : IWebGamePlatform
{
assetBundle.APUnload(unloadAll);
}
/// <inheritdoc/>
public bool IsCached(string cacheFilePath)
{
return false;
}
/// <inheritdoc/>
public string GetCacheFilePath(string rootPath, PackageBundle bundle)
{
return PathUtility.Combine(rootPath, bundle.GetFileName());
}
}
#endif

View File

@@ -28,17 +28,5 @@ internal class TaptapPlatform : IWebGamePlatform
{
assetBundle.TapUnload(unloadAll);
}
/// <inheritdoc/>
public bool IsCached(string cacheFilePath)
{
return false;
}
/// <inheritdoc/>
public string GetCacheFilePath(string rootPath, PackageBundle bundle)
{
return PathUtility.Combine(rootPath, bundle.GetFileName());
}
}
#endif

View File

@@ -1,6 +1,5 @@
#if UNITY_WEBGL && DOUYINMINIGAME
using YooAsset;
using TTSDK;
public static class TiktokFileSystemCreater
{
@@ -29,7 +28,7 @@ internal class TiktokFileSystem : WebGameFileSystem
/// <inheritdoc/>
protected override IWebGamePlatform CreatePlatform(string packageRoot)
{
return new TiktokPlatform(TT.GetFileSystemManager());
return new TiktokPlatform();
}
}
#endif

View File

@@ -9,17 +9,6 @@ using TTSDK;
/// </summary>
internal class TiktokPlatform : IWebGamePlatform
{
private readonly TTFileSystemManager _fileSystemMgr;
/// <summary>
/// 创建 TiktokPlatform 实例
/// </summary>
/// <param name="fileSystemMgr">抖音文件系统管理器</param>
internal TiktokPlatform(TTFileSystemManager fileSystemMgr)
{
_fileSystemMgr = fileSystemMgr;
}
/// <inheritdoc/>
public UnityWebRequest CreateAssetBundleRequest(string url)
{
@@ -38,17 +27,5 @@ internal class TiktokPlatform : IWebGamePlatform
{
assetBundle.TTUnload(unloadAll);
}
/// <inheritdoc/>
public bool IsCached(string cacheFilePath)
{
return false;
}
/// <inheritdoc/>
public string GetCacheFilePath(string rootPath, PackageBundle bundle)
{
return _fileSystemMgr.GetLocalCachedPathForUrl(bundle.GetFileName());
}
}
#endif

View File

@@ -27,21 +27,5 @@ internal class WechatPlatform : IWebGamePlatform
{
assetBundle.WXUnload(unloadAll);
}
/// <inheritdoc/>
public bool IsCached(string cacheFilePath)
{
if (string.IsNullOrEmpty(cacheFilePath))
return false;
string result = WX.GetCachePath(cacheFilePath);
return string.IsNullOrEmpty(result) == false;
}
/// <inheritdoc/>
public string GetCacheFilePath(string rootPath, PackageBundle bundle)
{
return PathUtility.Combine(rootPath, bundle.GetFileName());
}
}
#endif