Skip to content

Commit 7ccab51

Browse files
committed
Revert "feat(快手文件系统): 集成快手运行时SDK以支持KSAssetBundle加载"
This reverts commit bac5546.
1 parent 88ee8c3 commit 7ccab51

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

Runtime/FileSystem/KuaiShouFileSystem/KuaiShouFileSystem.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public WebRemoteServices(string buildinPackRoot)
5353
}
5454

5555
[UnityEngine.Scripting.Preserve]
56-
string IRemoteServices.GetRemoteMainURL(string fileName, string packageVersion)
56+
string IRemoteServices.GetRemoteMainURL(string fileName,string packageVersion)
5757
{
5858
return GetFileLoadURL(fileName, packageVersion);
5959
}
@@ -73,7 +73,6 @@ private string GetFileLoadURL(string fileName, string packageVersion)
7373
url = DownloadSystemHelper.ConvertToWWWPath(filePath);
7474
_mapping.Add(fileName, url);
7575
}
76-
7776
//Debug.LogError($"WeChatFileSystem GetFileLoadURL url:{url}");
7877
return url;
7978
}
@@ -164,8 +163,8 @@ public virtual FSClearUnusedBundleFilesOperation ClearUnusedBundleFilesAsync(Pac
164163
[UnityEngine.Scripting.Preserve]
165164
public virtual FSDownloadFileOperation DownloadFileAsync(PackageBundle bundle, DownloadParam param)
166165
{
167-
param.MainURL = RemoteServices.GetRemoteMainURL(bundle.FileName, PackageVersion);
168-
param.FallbackURL = RemoteServices.GetRemoteFallbackURL(bundle.FileName, PackageVersion);
166+
param.MainURL = RemoteServices.GetRemoteMainURL(bundle.FileName,PackageVersion);
167+
param.FallbackURL = RemoteServices.GetRemoteFallbackURL(bundle.FileName,PackageVersion);
169168
var operation = new KSFSDownloadFileOperation(this, bundle, param);
170169
OperationSystem.StartOperation(PackageName, operation);
171170
return operation;
@@ -174,15 +173,15 @@ public virtual FSDownloadFileOperation DownloadFileAsync(PackageBundle bundle, D
174173
[UnityEngine.Scripting.Preserve]
175174
public virtual FSLoadBundleOperation LoadBundleFile(PackageBundle bundle)
176175
{
177-
var operation = new KSFSLoadBundleOperation(this, bundle, PackageVersion);
176+
var operation = new KSFSLoadBundleOperation(this, bundle,PackageVersion);
178177
OperationSystem.StartOperation(PackageName, operation);
179178
return operation;
180179
}
181180

182181
[UnityEngine.Scripting.Preserve]
183182
public virtual void UnloadBundleFile(PackageBundle bundle, object result)
184183
{
185-
var assetBundle = (result as KSWASM.KSAssetBundle);
184+
AssetBundle assetBundle = result as AssetBundle;
186185
if (assetBundle != null)
187186
{
188187
assetBundle.Unload(true);
@@ -213,7 +212,7 @@ public virtual void OnCreate(string packageName, string rootDirectory)
213212
string webRoot = PathUtility.Combine(Application.streamingAssetsPath, YooAssetSettingsData.Setting.DefaultYooFolderName, packageName);
214213
RemoteServices = new WebRemoteServices(webRoot);
215214
}
216-
215+
217216
_fileSystemManager = KSWASM.KSBase.GetFileSystemManager();
218217
#if UNITY_EDITOR
219218
_fileCacheRoot = Application.persistentDataPath;

Runtime/FileSystem/KuaiShouFileSystem/Operation/KSFSLoadBundleOperation.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ private enum ESteps
2020
private string _packagerVersion;
2121

2222
[UnityEngine.Scripting.Preserve]
23-
internal KSFSLoadBundleOperation(KuaiShouFileSystem fileSystem, PackageBundle bundle, string packagerVersion)
23+
internal KSFSLoadBundleOperation(KuaiShouFileSystem fileSystem, PackageBundle bundle,string packagerVersion)
2424
{
2525
_fileSystem = fileSystem;
2626
_bundle = bundle;
@@ -49,7 +49,7 @@ public override void InternalOnUpdate()
4949
if (_webRequest == null)
5050
{
5151
string mainURL = _fileSystem.RemoteServices.GetRemoteMainURL(_bundle.FileName, _packagerVersion);
52-
_webRequest = KSWASM.KSAssetBundle.GetAssetBundle(mainURL);
52+
_webRequest = UnityWebRequestAssetBundle.GetAssetBundle(mainURL);
5353
_webRequest.SendWebRequest();
5454
}
5555

@@ -64,7 +64,9 @@ public override void InternalOnUpdate()
6464
if (CheckRequestResult())
6565
{
6666
_steps = ESteps.Done;
67-
Result = (_webRequest.downloadHandler as KSWASM.DownloadHandlerKSAssetBundle)?.assetBundle;
67+
Result = (_webRequest.downloadHandler as DownloadHandlerAssetBundle)?.assetBundle;
68+
69+
6870
Status = EOperationStatus.Succeed;
6971
}
7072
else

Runtime/YooAsset.Runtime.asmdef

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
"rootNamespace": "YooAsset",
44
"references": [
55
"StarkWebGL",
6-
"Wx",
7-
"kuaishou.runtime"
6+
"Wx"
87
],
98
"includePlatforms": [],
109
"excludePlatforms": [],

0 commit comments

Comments
 (0)