mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-14 19:40:47 +00:00
update extension sample
更新抖音小游戏文件系统
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.Networking;
|
||||
using YooAsset;
|
||||
using StarkSDKSpace;
|
||||
|
||||
internal class BGFSDownloadFileOperation : DefaultDownloadFileOperation
|
||||
{
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#if UNITY_WEBGL && BYTEMINIGAME
|
||||
using UnityEngine;
|
||||
using UnityEngine.Networking;
|
||||
using WeChatWASM;
|
||||
using YooAsset;
|
||||
using StarkSDKSpace;
|
||||
|
||||
internal class BGFSLoadBundleOperation : FSLoadBundleOperation
|
||||
{
|
||||
@@ -37,7 +37,7 @@ internal class BGFSLoadBundleOperation : FSLoadBundleOperation
|
||||
if (_webRequest == null)
|
||||
{
|
||||
string mainURL = _fileSystem.RemoteServices.GetRemoteMainURL(_bundle.FileName);
|
||||
_webRequest = UnityWebRequestAssetBundle.GetAssetBundle(mainURL);
|
||||
_webRequest = TTAssetBundle.GetAssetBundle(mainURL);
|
||||
_webRequest.SendWebRequest();
|
||||
}
|
||||
|
||||
@@ -49,11 +49,11 @@ internal class BGFSLoadBundleOperation : FSLoadBundleOperation
|
||||
|
||||
if (CheckRequestResult())
|
||||
{
|
||||
var assetBundle = (_webRequest.downloadHandler as DownloadHandlerAssetBundle).assetBundle;
|
||||
var assetBundle = (_webRequest.downloadHandler as DownloadHandlerTTAssetBundle).assetBundle;
|
||||
if (assetBundle == null)
|
||||
{
|
||||
_steps = ESteps.Done;
|
||||
Error = $"{nameof(DownloadHandlerAssetBundle)} loaded asset bundle is null !";
|
||||
Error = $"{nameof(DownloadHandlerTTAssetBundle)} loaded asset bundle is null !";
|
||||
Status = EOperationStatus.Failed;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user