mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-06-22 12:43:44 +00:00
refactor: remove WebGame platform cache query APIs
移除 WebGame 平台缓存查询接口
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user