update extension sample

更新抖音小游戏文件系统
pull/455/head
何冠峰 2025-01-02 18:45:54 +08:00
parent 7cbdfeec51
commit c0a1061204
2 changed files with 5 additions and 4 deletions

View File

@ -2,6 +2,7 @@
using UnityEngine; using UnityEngine;
using UnityEngine.Networking; using UnityEngine.Networking;
using YooAsset; using YooAsset;
using StarkSDKSpace;
internal class BGFSDownloadFileOperation : DefaultDownloadFileOperation internal class BGFSDownloadFileOperation : DefaultDownloadFileOperation
{ {

View File

@ -1,8 +1,8 @@
#if UNITY_WEBGL && BYTEMINIGAME #if UNITY_WEBGL && BYTEMINIGAME
using UnityEngine; using UnityEngine;
using UnityEngine.Networking; using UnityEngine.Networking;
using WeChatWASM;
using YooAsset; using YooAsset;
using StarkSDKSpace;
internal class BGFSLoadBundleOperation : FSLoadBundleOperation internal class BGFSLoadBundleOperation : FSLoadBundleOperation
{ {
@ -37,7 +37,7 @@ internal class BGFSLoadBundleOperation : FSLoadBundleOperation
if (_webRequest == null) if (_webRequest == null)
{ {
string mainURL = _fileSystem.RemoteServices.GetRemoteMainURL(_bundle.FileName); string mainURL = _fileSystem.RemoteServices.GetRemoteMainURL(_bundle.FileName);
_webRequest = UnityWebRequestAssetBundle.GetAssetBundle(mainURL); _webRequest = TTAssetBundle.GetAssetBundle(mainURL);
_webRequest.SendWebRequest(); _webRequest.SendWebRequest();
} }
@ -49,11 +49,11 @@ internal class BGFSLoadBundleOperation : FSLoadBundleOperation
if (CheckRequestResult()) if (CheckRequestResult())
{ {
var assetBundle = (_webRequest.downloadHandler as DownloadHandlerAssetBundle).assetBundle; var assetBundle = (_webRequest.downloadHandler as DownloadHandlerTTAssetBundle).assetBundle;
if (assetBundle == null) if (assetBundle == null)
{ {
_steps = ESteps.Done; _steps = ESteps.Done;
Error = $"{nameof(DownloadHandlerAssetBundle)} loaded asset bundle is null !"; Error = $"{nameof(DownloadHandlerTTAssetBundle)} loaded asset bundle is null !";
Status = EOperationStatus.Failed; Status = EOperationStatus.Failed;
} }
else else